i
i
i
i
i
i
i
i
A.2. Quaternions and Rotation 539
A.2 Quaternions and Rotation
We have seen in Section 6.6.3 that the action of rotating a vector r from
one orientation to another may be expressed in terms of the application of
a transformation m atrix R which transforms r to r
= Rr, which has a new
orientation. The matrix R is independent of r and will perform the same
(relative) rotation on any other vector.
One can write R in terms of the Euler angles, i.e., as a function R(
, , ).
However, the same rotation can also be achieved by specifying R in terms of a
unit vector ˆn and a single angle
. That is, r is transformed into r
by rotating
it round ˆn through . The angle is positive when the rotation takes place in
a clockwise direction when viewed along ˆn from its base. The two equivalent
rotations may be written as
r
= R( , , )r;
r
= R
( , ˆn)r.
At first sight, it might seem difficult to appreciate that the same transforma-
tion can be achieved by specifying a single rotation round one axis as opposed
to three rotations round three or thogonal axes. It is a lso quite difficult to
imagine how (
, ˆn) might be calculated, given the more naturally intuitive
and easier to specify Euler angles ( , , ). However, there is a need for meth-
ods to switch from one representation to another.
In a number of important situations, it is necessary to use the
(
, ˆn) representation. For example, the Virtual Reality Modeling
Language (VRML) [2] uses the ( , ˆn) specification to define the
orientation adopted by an object in a virtual world.
Watt and Watt [4, p. 359] derive an expression that gives some insight
into the significance of the (
, ˆn) specification of a rotational transform by
determining Rr intermsof( , ˆn):
r
= Rr = cos r + (1 − cos )(ˆn · r )ˆn + (sin ) ˆn × r. (A.1)
This expression is the vital link between rotational transformations and the
use of quaternions to represent them. To see this consider two quaternions:
1. p = (0, r), a quaternion formed by setting its scalar part to zero and its
vector part to r (the vector we wish to transform).