Graphics Programs Reference
In-Depth Information
The point is that transforming the viewer with A or transforming the object with
A 1 will bring them to the same relative position . Once the object has been trans-
formed, we can use matrix T p [Equation (3.4)] to compute the perspective projection
because the viewer is still located at the standard position. In practice, there is, of
course, no need to actually transform the object. All that we have to do is compute
matrix T = A 1
T p and multiply each point of the object by T .
Example: A viewer located at the standard position and an object close
to the origin (Figure 3.29) . Suppose that we want to translate the viewer to the
origin, rotate him 45 counterclockwise and then translate him k units in both the
negative x and negative z directions (Figure 3.29a,b,c). The transformation matrices
are
·
cos 45
sin 45
1000
0100
0010
00 k
0
0
0
1
0
0
T 1 =
,
T 2 =
,
sin 45
cos 45
0
0
1
0
0
0
1
1000
0100
0010
T 3 =
.
k
0
k
1
x
x
x
(a)
(b)
(c)
z
x
x
x
(d)
(e)
(f)
z
Figure 3.29: Transforming Viewer or Object.
The reverse transformations, performed in reverse order, are (Figure 3.29d,e,f)
cos 45
0 in
1000
0100
0010
k
0
1000
0100
0010
00
0
1
0
0
A 1 =
sin 45
0
cos 45
0
0
k
1
0
0
0
1
k
1
Search WWH ::




Custom Search