Why multiplying those 2 quaternions doesn't give the expected result?

171 Views Asked by At

Using a left-handed coordinate system, let

Q = axisAngle({0,0,1}, 1/4*pi) * axisAngle({0,1,0}, 1/4*pi)

be the quaternion representing the rotation "1/8 circle clockwise around the global Z axis, then inclinate 1/8 circle down". Also, let $V$ be the result of rotating $\{1,0,0\}$ by $Q$. By using a calculator, I found that:

$V = \left\{\frac12, \frac12, -\sqrt{\frac12}\right\}$

But I expected $V$ to be:

$V = \left\{\sqrt{\frac13}, \sqrt{\frac13}, -\sqrt{\frac13}\right\}$

After all, if we apply said rotation manually, that's the direction we get. What is wrong with my elaboration?

1

There are 1 best solutions below

0
On

If you define the rotation of $V$ by $Q=Q_LQ_R$ to be $$(Q_LQ_R)V(Q_LQ_R)^{-1}=Q_L\left(Q_RVQ_R^{-1}\right)Q_L^{-1},$$ then you're rotating by $Q_R$ first and $Q_L$ second. So you're rotating $\{1,0,0\}$ around the Y axis, then the Z axis.

Edit: The above is one problem. Another problem is that all rotations by $\pi/4$ around the global axes are matrices whose elements are rational multiples of $\sqrt2$. There's no way to combine such matrices, in any order, that will generate $\sqrt3$. In order to get that, you'll want a different angle for your second rotation, something like $\pi/6$ or $\pi/3$.