Are there two conflicting definitions of conversion between quaternion and axis-angle representation

geometry

I have some trouble understanding (in my opinion) two conflicting definitions of the quaternion logarithm or the conversion between quaternions and axis-angle representation.

In the second paragraph of this Wikipedia article, a rotation / orientation quaternion is defined as

$$[a, b, c, d] = [\cos(\theta/2),e_x \sin(\theta/2),e_y \sin(\theta/2),e_z \sin(\theta/2)]$$

representing a rotation of $\theta$ about a unit axis $[e_x, e_y, e_z]$ (changed notation). If we want to obtain the axis-angle representation from a quaternion, we can determine the angle as $\theta = 2\arccos(a)$.

I also often see this definition of the quaternion logarithm:

$$\log([a, b, c, d]) = \log ([\cos \theta, e \sin \theta]) \equiv [0, \theta e]$$

Which does not imply that there is a factor 2 involved in the conversion. You would compute $\theta = \arccos(a)$.

Now, the definition in this paper (Equation 19, page 4) is similar and is used to obtain an axis-angle representation from the quaternion. However, to obtain angular velocity from the logarithm of the difference of two quaternions, they multiply the logarithm by 2 again:

$$\omega = 2 \log(q_1 * \overline{q}_2)$$

So it seems like you could as well define

$$\log([a, b, c, d]) = \log ([\cos \theta / 2, e \sin \theta / 2]) \equiv [0, \theta e]$$

to obtain $\theta = 2\arccos(a)$ and then define

$$\omega = \log(q_1 * \overline{q}_2).$$

Are these actually two conflicting definitions of this conversion (or the quaternion representation of rotations)? What is the reason and how can this be resolved?

Best Answer

It's only a notation issue. Some use $\alpha = \theta / 2$, with $\theta$ as the actual rotation angle, i.e. $$\mathbf{q} = \cos\left(\frac{\theta}{2}\right) + \mathbf{n}\sin\left(\frac{\theta}{2}\right) = \cos \alpha + \mathbf{n}\sin \alpha$$

I'm sure you can see how that simplifies the notation.

Indeed, 3D Math Primer for Graphics and Game Development – the reference used in the linked to other definition source – explicitly states $\alpha = \theta / 2$ with $\theta$ being the angle of rotation, before equation 10.15, $$\log \mathbf{q} = \log\left(\left[\begin{matrix}\cos\alpha & \mathbf{n}\sin\alpha]\end{matrix}\right]\right) \equiv \left[\begin{matrix} 0 & \alpha\mathbf{n}\end{matrix}\right]$$