Game Development Reference
In-Depth Information
Conceptually, a quaternion expresses angular displacement by using
an axis of rotation and an amount of rotation about that axis.
A quaternion contains a scalar component w and a vector component
v . They are related to the angle of rotation θ and the axis of rotation
n by
v = n sin(θ/2).
w = cos(θ/2),
Every angular displacement in 3D has exactly two different represen-
tations in quaternion space, and they are negatives of each other.
The identity quaternion, which represents “no angular displacement,”
is [1, 0 ].
All quaternions that represent angular displacement are “unit quater-
nions” with magnitude equal to 1.
The conjugate of a quaternion expresses the opposite angular dis-
placement and is computed by negating the vector portion v . The
inverse of a quaternion is the conjugate divided by the magnitude. If
you use quaternions only to describe angular displacement (as we do
in this topic), then the conjugate and inverse are equivalent.
Quaternion multiplication can be used to concatenate multiple rota-
tions into a single angular displacement. In theory, quaternion mul-
tiplication can also be used to perform 3D vector rotations, but this
is of little practical value.
Quaternion exponentiation can be used to calculate a multiple of an
angular displacement. This always captures the correct end result;
however, since quaternions always take the shortest arc, multiple rev-
olutions cannot be represented.
Quaternions can be interpreted as 4D complex numbers, which creates
interesting and elegant parallels between mathematics and geometry.
A lot more has been written about quaternions than we have had the
space to discuss here. The technical report by Dam et al [11] is a good
mathematical summary. Kuiper's book [41] is written from an aerospace
perspective and also does a good job of connecting quaternions and Eu-
Search WWH ::




Custom Search