Whats the use of representing rotation with quaternions compared to normal axis angle representation? I've been trying to learn quaternions and they make enough sense but as far as I can tell quaternions are just axis angle with a transformed axis and angle of rotation. How exactly does transforming the axis and angle of rotation affect the matrix instead of just representing it normally through axis angle?
-
3You rotate an object by an angle $\theta_1$ about an axis $a_1$. Then you rotate it by an angle $\theta_2$ about a different axis $a_2$. What is the net rotation in axis-angle representation? Now you know why quaternions are useful. – Jul 03 '13 at 23:51
-
2I don't get what you mean? – Blue bear Jul 04 '13 at 00:54
-
1If you have two successive rotations and want to determine the net effect in terms of a single rotation, it is easier to perform that composition with quaternions than with the axis-angle representation. – Tpofofn Jul 04 '13 at 01:05
-
2But what is it about quaternions that makes this easier? – Blue bear Jul 04 '13 at 01:26
-
There is a lot of information in the advantages of quaternions section of the Wikipedia article. – Alexander Gruber Jul 03 '13 at 23:26
2 Answers
I think the best way to understand the advantage of quaternions is to consider them as an extension to the three-dimensional space of the representation of rotations in the plane with complex numbers.
As a rotation of angle $\theta$ around the origin in the plane is represented, in a very simple and expressive way, by the complex number $e^{i\theta}$, so a rotation of an angle $2\theta$ in space, around an axis passing through the origin, is represented by a quaternion $e^{\mathbf{u}\theta}$, where $\mathbf{u}$ is the imaginary quaternion that correspond to the unit vector oriented along the axis of rotation. So we have the correspondence: $$ \vec{w}=R_{\mathbf{u},\theta} \; \vec{v} \quad \longleftrightarrow \quad \mathbf{w}= e^{\mathbf{u}\theta/2}\mathbf{v}e^{-\mathbf{u}\theta/2} $$
For example, given the rotation around the axis passing through the origin and the point of coordinates $(1,1,1)$ and angle $\theta=\pi/2$, it is easy to write the corresponding quaternion: $$ e^{\frac{\theta}{4}\frac{ (\mathbf{i}+\mathbf{j}+\mathbf{k})}{\sqrt{3}}} $$ which is simpler and more expressive then the corresponding matrix. And, using the properties of quaternions, we can easily prove corresponding properties for rotations, as:
reverse the versor is equivalent to reverse the rotation: $\quad e^{\theta(-\mathbf{u})}=e^{-\theta\mathbf{u}}$
rotations about the same axis commute: $\quad e^{\theta\mathbf{u}}e^{\psi\mathbf{u}}=e^{\psi\mathbf{u}}e^{\theta\mathbf{u}}=e^{(\theta+\psi)\mathbf{u}}$
but rotation about different axis don't : $ \quad \quad e^{\theta\mathbf{u}}e^{\theta\mathbf{v}}\ne e^{\theta\mathbf{v}}e^{\theta\mathbf{u}} \ne e^{\theta(\mathbf{u}+\mathbf{v})}$
and solve problems about rotations (as in Rotation Equivalence using Quaternions).
And more: we can easily see (in analogy with $U(1)$ for complex numbers) that unit quaternions form a group under multiplication, corresponding to the 3-sphere $S^3$, that is a double covering of $ SO(3,\mathbb{R})$ where the exponential $e^z$ is the canonical link between Lie algebras and Lie groups.
Obviously you can prove all these things even in the formalism of the matrices, but the use of quaternions seems more simple and expressive.
Finally, the use of quaternions is also useful from the computational point of view, because it is simple to implement and allows to avoid some problems as indicated in the Wikipedia page quoted by @Alexander Gruber.

- 62,675
-
Thanks, this is how I mostly think about them. Do you have a basic/intuitive explanation for why rotation angle needs to be halved when working with quaternions? – unlut Aug 29 '19 at 13:14
From what I understand, a quaternion is a unit-length vector on a hyper-sphere (which is a four dimensional sphere). And if you multiply two quaternions you get a quaternion out again representing the combined rotation. You cannot do that easily with two axis/angle pairs.