Saturday, November 26, 2005

Quaternions and Rotations

In the next post we'll see how quaternions are used in game development, but first I need to describe their connection with rotations. Under multiplication the rotations form a group, SO(3),
whose elements are special (ie determinant = +1) orthogonal 3x3 matrices. Rotations have 3 degrees of freedom, which can be written, for example, as the 3 Euler angles. Now, quaternions are a generalisation of the real and complex numbers to 4 dimensions, they can be written as q = w + xi + yj + zk, where i,j,k satisfy the relations i^2 = j^2 = k^2 = ijk = -1. Since they have 4 components (w,x,y,z) we can consider them as points in a 4-d vector space. We are primarily interested in normalised quaternions, which form a 3-sphere in the 4-d space (note that there are 3 degrees of freedom). Under multiplication the normalised quaternions form a group that has a representation, namely SU(2), in terms of special unitary 2x2 matrices [essentially one replaces i,j,k by the 3 Pauli matrices multiplied by (-i)]. Now in physics SU(2) is the group that describes the intrinsic spin of fundamental particles and it is well known that it provides a double covering of the group SO(3). That is, there is a 2 to 1 homomorphism from SU(2) to SO(3). Basically this means that each quaternion maps to a rotation, but that there are 2 quaternions (q and -q) for each rotation. Rotation through 2 pi introduces a minus sign and one must rotate through 4 pi to get back to the original quaternion. Details can be found on Wikipedia (http://en.wikipedia.org/wiki/Quaternion) or in any relevant textbook.

Labels:

0 Comments:

Post a Comment

<< Home