Conversion between quaternions and Euler angles: Difference between revisions

Content deleted Content added
Line 13:
:<math>\mathbf{q}_3 = \mathbf{q}_z = \sin(\alpha/2)\cos(\beta_z)</math>
where α is a simple rotation angle (the value in radians of the [[angle of rotation]]) and cos(β<sub>''x''</sub>), cos(β<sub>''y''</sub>) and cos(β<sub>''z''</sub>) are the "[[direction cosine]]s" of the angles between the three coordinate axes and the axis of rotation. (Euler's Rotation Theorem).
 
==Intuition==
To better understand how "[[direction cosine]]s" work with quaternions:
 
:<math>\begin{array}{lcr} \mathbf{q}_0 = \mathbf{q}_w = \cos(rotation\;angle/2)\\
\mathbf{q}_1 = \mathbf{q}_x = \sin(rotation\;angle/2)\cos(angle\;between\;axis\;of\;rotation\;and\;x\;axis)\\
\mathbf{q}_2 = \mathbf{q}_y = \sin(rotation\;angle/2)\cos(angle\;between\;axis\;of\;rotation\;and\;y\;axis)\\
\mathbf{q}_3 = \mathbf{q}_z = \sin(rotation\;angle/2)\cos(angle\;between\;axis\;of\;rotation\;and\;z\;axis)\end{array}</math>
 
If the [[axis of rotation]] is the ''x''-axis:
 
:<math>\begin{array}{lcr} \mathbf{q}_0 = \mathbf{q}_w = \cos(\alpha/2)\\
\mathbf{q}_1 = \mathbf{q}_x = \sin(\alpha/2)\cdot1\\
\mathbf{q}_2 = \mathbf{q}_y = \sin(\alpha/2)\cdot0\\
\mathbf{q}_3 = \mathbf{q}_z = \sin(\alpha/2)\cdot0\end{array}</math>
 
If the [[axis of rotation]] is the ''y''-axis:
 
:<math>\begin{array}{lcr} \mathbf{q}_0 = \mathbf{q}_w = \cos(\alpha/2)\\
\mathbf{q}_1 = \mathbf{q}_x = \sin(\alpha/2)\cdot0\\
\mathbf{q}_2 = \mathbf{q}_y = \sin(\alpha/2)\cdot1\\
\mathbf{q}_3 = \mathbf{q}_z = \sin(\alpha/2)\cdot0\end{array}</math>
 
If the [[axis of rotation]] is a [[Vector_(mathematics_and_physics)|vector]] located 45° ({{sfrac|{{pi}}|4}} radians) between the ''x'' and ''y'' axes:
 
:<math>\begin{array}{lcr} \mathbf{q}_0 = \mathbf{q}_w = \cos(\alpha/2)\\
\mathbf{q}_1 = \mathbf{q}_x = \sin(\alpha/2)\cdot0.707 \ldots\\
\mathbf{q}_2 = \mathbf{q}_y = \sin(\alpha/2)\cdot0.707 \ldots\\
\mathbf{q}_3 = \mathbf{q}_z = \sin(\alpha/2)\cdot0\end{array}</math>
 
Therefore, the ''x'' and ''y'' axes "share" influence over the new [[axis of rotation]].
 
===Tait–Bryan angles===