I am trying to use Geometric Algebra to rotate a 4D vector, given 6 rotation angles for each of the planes. So for $e_1e_2$:
Vector: $ v = ae_1 + be_2 + ce_3 + de_4 $
Rotor in $e_1e_2$ plane: $R_{e_1e_2\theta} = \cos\theta/2 - \sin\theta/2e_1e_2 = e^{-e_1e_2\theta/2} $
Rotation of $v$ in plane $e_1e_2$: $R(v) =R_{e_1e_2\theta} (v)R_{-e_1e_2\theta} $
Writing $A = cos\theta/2$, $ B = \sin\theta/2$
the equation becomes:
$R(v) = (A-Be_1e_2)(ae_1 + be_2 + ce_3 + de_4)(A+Be_1e_2)$
After spending a very long time expanding these brackets I ended up with the new vector:
$v' = (a\cos\theta - b\sin\theta) e_1 + (a\sin\theta + b\cos\theta)e_2 + ce_3 + de_4 $
This looks like the the standard rotation formula I was trying to avoid to prevent gimball lock.
I am very confused. Is there a way to implement rotations with Geometric Algebra or Quaternions for a given set of angles? I have found lots of methods for rotating a 4D vector to another predefined vector but nothing using angles.
I have been considering specifiying a new vector to rotate to instead of using angles. Could I add a scaled unit vector to rotate my 4D vector?
Something like: $v_{old} = ae_1 + be_2 + ce_3+ de_4\\ v_{rotateTo} = \frac{ae_1 + be_2 +ce_3 + de_4 + fe_1}{|ae_1 + be_2 +ce_3 + de_4 + fe_1|} $
I would greatly appreciate any help you could offer me