Extract the angle of rotation from a unit quaternion

2.2k Views Asked by At

Sorry for boring you my friends before the spring vacation. I am haunted by a simple problem of how to extract rotation angle from a unit quaternion.

Suppose $a$ is a unit quaternion which takes the form of: $$a = \left( \cos \left(\frac{\phi}{2} \right),\sin \left(\frac{\phi}{2}\right)\cdot \overrightarrow{n}\right)$$

$\phi$ is the angle of rotation and $\overrightarrow{n}$ is the axis of rotation.

I have seen in the books, the popular approach to extract the angle of rotation is via the inverse function of $sin$ or $cos$, but the result of inverse function remains valid and unique when the rotation is positive and small. Thus, I wonder if there is another approach in which the extracted angle could be extended in both directions (positive or negative) and in the scope of large rotation.

Thank you in advance for taking a look and giving a hint.