I have two quaternions, $q_1$ and $q_2$. I want to rotate the axis of rotation of $q_1$ by $q_2$. Is there any way of doing this directly, without extracting the axis of rotation from $q_1$, rotating it and re-inserting it again?
Please note that I am not trying to perform a combined rotation by quaternion multiplication ($q' = q_2q_1$). Instead I want to rotate the axis of rotation of $q_1$.
Best Answer
The whole thing can be done with quaternion arithmetic.
The axis of $q_1$ is $a=\frac{q_1-\overline{q_1}}{2}$, and by computing $q_2aq_2^{-1}$ you will be rotating the vector $a$ into a new direction.