i
i
i
i
i
i
i
i
6.6. Transformations 137
Again, it is possible to derive this transformation using the principles
described previously for rotation around the z-axis, as can the transformation
for the rotation about the x-axis.
Rotation About the x-Axis
To rotate round the x-axis by an angle , the transformation matrix is
T
x
( ) =
⎡
⎢
⎢
⎣
10 0 0
0cos −sin 0
0 sin
cos 0
00 0 1
⎤
⎥
⎥
⎦
.
Note that as illustrated in Figure 6.11,
is positive if the rotation
takes place in a clockwise sense when looking from the origin along the
axis of rotation. This is consistent with a right-handed coordinate
system.
6.6.4 Combining Transformations
Section 6.6 introduced the key concept of a transformation applied to a po-
sition vector. In many cases, we are interested in what happens when several
operations are applied in sequence to a model or one of its points (vertices).
For example, move the point P 10 units forward, r otate it 20 degrees round the
z-axis and shift it 15 units along the x-axis. Each transformation is represented
by a single 4 ×4 matrix, and the compound transformation is constructed as
a sequence of single transformations as follows:
p
= T
1
p;
p
= T
2
p
;
p
= T
3
p
.
Where p
and p
are intermediate position vectors and p
is the end
vector after the application of the three transformations. The above sequence
can be combined into
p
= T
3
T
2
T
1
p.
The product of the transformations T
3
T
2
T
1
gives a single matrix T .Com-
bining transformations in this way has a wonderful efficiency: if a large model
has 50,000 vertices and we need to apply 10 transformations, by combining