Graphics Reference
In-Depth Information
A common sequence for applying these rotations is
roll
,
pitch
,
yaw
, as seen in the
following transform:
⎡
⎤
⎡
⎤
x
y
z
x
y
z
⎣
⎦
=
⎣
⎦
R
yaw,y
R
pitch,x
R
roll,z
and if a translation is involved,
⎡
⎣
⎤
⎦
=
⎡
⎣
⎤
⎦
x
y
z
1
x
y
z
1
T
t
x
,t
y
,t
z
R
yaw,y
R
pitch,x
R
roll,z
.
9.6 Rotating a Point About an Arbitrary Axis
Now let's examine two ways of rotating a point about an arbitrary axis. The first
technique uses matrices and trigonometry and is rather laborious. The second ap-
proach employs vector analysis and is quite succinct. Fortunately, they both arrive
at the same result!
9.6.1 Matrices
We begin by defining an axis using a unit vector
n
about which a point
P
is rotated
α
to
P
as shown in Fig.
9.10
. And as we only have access to matrices that rotate
points about the Cartesian axes, this unit vector has to be temporarily aligned with a
Cartesian axis. In the following example we choose the
x
-axis. During the alignment
process, the point
P
is subjected to the transforms necessary to align the unit vector
with the
x
-axis. We then rotate
P
,
α
about the
x
-axis. To complete the operation, the
rotated point is subjected to the transforms that return the unit vector to its original
position. Although matrices provide a powerful tool for undertaking this sort of
ˆ
Fig. 9.10
The geometry
associated with rotating a
point about an arbitrary axis