i
i
i
i
i
i
i
i
134 6. A Pocket 3D Theory Reference
This transformation will allo w us to move the point with coordinates (x, y, z)
to the point with coordinates (x + dx, y + dy, z + dz). That is, the translated
point becomes p
= T
t
p or
⎡
⎢
⎢
⎣
x + dx
y + dy
z + dz
1
⎤
⎥
⎥
⎦
=
⎡
⎢
⎢
⎣
100dx
010dy
001dz
000 1
⎤
⎥
⎥
⎦
⎡
⎢
⎢
⎣
x
y
z
1
⎤
⎥
⎥
⎦
.
6.6.2 Scaling
Scaling is represented by the general transformation matrix:
T
s
=
⎡
⎢
⎢
⎣
s
x
000
0 s
y
00
00s
z
0
0001
⎤
⎥
⎥
⎦
.
Essentially this allows us to scale (expand or contract) a position vector p
with components (x, y, z) by the factors s
x
along the x-axis, s
y
along the y-
axis and s
z
along the z-axis. Thus, for example, if we scaled the three vertex
positions of a polygon, we could effectively change its size, i.e., make it larger
or smaller. The scaled point p
is given ...