next up previous contents
Next: Solution of the minimization Up: Theory and implementation Previous: Optimal superposition.   Contents

Quaternions and rotations.
The rotational minimization problem can be elegantly solved by using quaternion algebra. Quaternions are so-called hypercomplex numbers, having a real unit, ${\bf 1}$, and three imaginary units, ${\bf I}$, ${\bf J}$, and ${\bf K}$. Since ${\bf I}{\bf J} = {\bf K}$ (cyclic), quaternion multiplication is not commutative. A possible matrix representation of an arbitrary quaternion,
\begin{displaymath}
{\bf A} = a_0\cdot{\bf 1} + a_1\cdot{\bf I} + a_2\cdot{\bf J} +
a_3\cdot{\bf K},
\end{displaymath} (4.53)

reads
\begin{displaymath}
{\bf A} = \left( \begin{array}{rrrr}
a_0 &-a_1 &-a_2 &-a_3...
...& a_0 &-a_1 \\
a_3 &-a_2 & a_1 & a_0
\end{array}
\right).
\end{displaymath} (4.54)

The components $a_\nu$ are real numbers. Similarly as normal complex numbers allow one to represent rotations in a plane, quaternions allow one to represent rotations in space. Consider the quaternion representation of a vector ${\bf r}$, which is given by
\begin{displaymath}
{\bf R} = x\cdot{\bf I} + y\cdot{\bf J} + z\cdot{\bf K},
\end{displaymath} (4.55)

and perform the operation
\begin{displaymath}
{\bf R}' = {\bf Q}{\bf R}{\bf Q}^T,
\end{displaymath} (4.56)

where ${\bf Q}$ is a normalized quaternion,
\begin{displaymath}
\Vert{\bf Q}\Vert^2 \doteq
q_0^2 + q_1^2 + q_2^2 + q_3^2 = \frac{1}{4}tr\{{\bf Q}^T{\bf Q}\} = 1.
\end{displaymath} (4.57)

The symbol $tr$ stands for `trace'. We note that a normalized quaternion is represented by an orthogonal $4\times 4$ matrix. ${\bf R}'$ may then be written as
\begin{displaymath}
{\bf R}' = x'\cdot{\bf I} + y'\cdot{\bf J} + z'\cdot{\bf K},
\end{displaymath} (4.58)

where the components $x',y',z'$, abbreviated as ${\bf r}'$, are given by
\begin{displaymath}
{\bf r}' = {\bf D}({\bf q}){\bf r}.
\end{displaymath} (4.59)

The matrix ${\bf D}({\bf q})$ is the rotation matrix defined in (4.52).


next up previous contents
Next: Solution of the minimization Up: Theory and implementation Previous: Optimal superposition.   Contents
pellegrini eric 2009-10-06