I've been trying to figure out how to write a C program that generates vectors of reflection $v$ and $w$ separated by an angle of $\frac{\theta}{2}$ that combine to form a rotor $R$ given an arbitrary bivector $B$ in $G(3)$ i.e. $ B = a\hat{i}\hat{j} + b\hat{i}\hat{k} + c\hat{j}\hat{k} $ representing the plane of rotation for $R$. This is so that I can perform a rotation of some other vector $u$ using the rotor $R$.
I know that it's possible to express any arbitrary bivector as a 2-blade, i.e. the wedge product of two vectors or $B = v\wedge{w}$. So my first thought was to try to determine an algorithm for decomposing $B$ into the 2-blade $v\wedge{w}$, which would give me 2 vectors co-planar with the plane of rotation and thus 2 vectors I could use for the reflection (so long as I corrected their angle of separation).
However my maths is really weak so figuring that out has been difficult!
Is anyone here familiar with a way to do this? The literature I've found so far always hand-waves away generating $v$ and $w$, saying something to the effect of "concoct 2 vectors separated by the angle $\frac{\theta}{2}$ in the plane of rotation", but I've been unable to figure this out algebraically.
Any help would be much appreciated!
Suppose that you have found one unit vector factor $ \hat{a} $ of $ B $. That is $ B \wedge \hat{a} = 0 $, then $$B = B \hat{a} \hat{a} = (B \hat{a}) \hat{a},$$ so the two factors are $ \mathbf{b} = B \hat{a} = B \cdot \hat{a} $, and $ \hat{a} $. The task becomes finding such a factor, normalized or otherwise.
Suppose that $$B = a_1 \mathbf{e}_{23} + a_2 \mathbf{e}_{31} + a_3 \mathbf{e}_{12}$$
Pick the coefficient $ a_i $ that has the largest absolute magnitude (this is to avoid numerical instability in case the bivector is ill-conditioned and has a small non-zero component in one direction), and select one of the two vector factors of the unit blade that is associated with that component, calling this $ \mathbf{e} $. For example, if that coefficient is $ a_3 $ then pick either $ \mathbf{e} = \mathbf{e}_1 $ or $ \mathbf{e} = \mathbf{e}_2 $.
Now, compute $$\mathbf{a} = B \cdot \mathbf{e}.$$ This vector lies in the plane that $ B $ represents. Specifically, it is the projection of $ \mathbf{e} $ onto $ B $, but rotated 90 degrees. If we dot $ \mathbf{a} $ with $ B $ then we find another vector that lies in the plane represented by $ B $, but is rotated 90 degrees in the plane, away from $ \mathbf{a} $. That is: $$\mathbf{b} = B \cdot \mathbf{a}$$ We've now found two perpendicular vectors that lie in the plane that $ B $ represents, so we have $$B \propto \mathbf{a} \mathbf{b} = \mathbf{a} \wedge \mathbf{b}.$$ For your rotor application, you probably want to normalize both $ \mathbf{a} $ and $ \mathbf{b} $.
Here's a numerical example: $$B = \mathbf{e}_{23} + 2 \mathbf{e}_{31} + 3 \mathbf{e}_{12}.$$ We can pick $ \mathbf{e} = \mathbf{e}_2 $, so $$ \mathbf{a} = B \cdot \mathbf{e}_2 = \left( { \mathbf{e}_{23} + 2 \mathbf{e}_{31} + 3 \mathbf{e}_{12} } \right) \cdot \mathbf{e}_2 = 3 \mathbf{e}_1 - \mathbf{e}_3.$$ $$\mathbf{b} = B \cdot \mathbf{a} = \left( { \mathbf{e}_{23} + 2 \mathbf{e}_{31} + 3 \mathbf{e}_{12} } \right) \cdot \left( { 3 \mathbf{e}_1 - \mathbf{e}_3 } \right) = 2 \mathbf{e}_1 - 10 \mathbf{e}_2 + 6 \mathbf{e}_3.$$ For which we find $$ \mathbf{b} \mathbf{a} = 10 \mathbf{e}_{23} + 20 \mathbf{e}_{31} + 30 \mathbf{e}_{12} = 10 B.$$ Observe that the scale factor here is exactly $ \mathbf{a}^2 $.
Another way to do this (or understand this with respect to tools that you already know -- the cross product), for $\mathbb{R}^{3}$, is to take advantage of duality. In particular, let $ B = \pm I \mathbf{n} $, where $ \mathbf{n} $ is a normal to the plane. Then for any vector $ \mathbf{e} $ $$\begin{aligned}\mathbf{a} = \mathbf{e} \cdot B &= \mathbf{e} \cdot (I \mathbf{n}) \\ &= {\left\langle{{ \mathbf{e} I \mathbf{n} }}\right\rangle}_{1} \\ &= {\left\langle{{ \mathbf{e} \mathbf{n} I }}\right\rangle}_{1} \\ &= {\left\langle{{ (\mathbf{e} \cdot \mathbf{n} + \mathbf{e} \wedge \mathbf{n}) I }}\right\rangle}_{1} \\ &= {\left\langle{{ (\mathbf{e} \wedge \mathbf{n}) I }}\right\rangle}_{1} \\ &= {\left\langle{{ (\mathbf{e} \times \mathbf{n}) I^2 }}\right\rangle}_{1} \\ &= \mathbf{n} \times \mathbf{e}.\end{aligned}$$ Such a vector is perpendicular to the normal (i.e.: lies in the plane). You can repeat this, computing $ \mathbf{n} \times \mathbf{a} $, to find a second vector in the plane, perpendicular to $ \mathbf{a} $.
I happened to have written $ B $ above in the dual form $ \mathbf{n} = - B I $, or $ B = I \mathbf{n} $, which can be seen by multiplication $$\begin{aligned}\mathbf{n} &= -B I \\ &= -\left( { a_1 \mathbf{e}_{23} + a_2 \mathbf{e}_{31} + a_3 \mathbf{e}_{12} } \right) \mathbf{e}_{123} \\ &= a_1 \mathbf{e}_{1} + a_2 \mathbf{e}_{2} + a_3 \mathbf{e}_{3},\end{aligned}$$ so you can pick off the normal coordinates easily.