Graphics Programs Reference
In-Depth Information
on the object with a curve, some of whose points may have negative z coordinates when
projected. Figure 3.31a is an example of an object where P 3 initially is not included
as an object point. The transformations move the object to the left such that part of
the curve between points P 1 and P 2 ends up to the left of the xy plane and P 3 has a
negative z coordinate. Once P 3 is included as an object point, the software discovers
that its projection has a negative z coordinate of, say, a units. The software then moves
all the object points a units to the right (Figure 3.31b) to obtain the correct projection
on the xy plane.
x
x
P 1
P 2
P 1
P 2
P 3
P 3
z
z
(a)
(b)
Figure 3.31: An Object with Negative z Coordinates.
On the other side of the screen, it all looks so easy.
—Jeff Bridges (as Kevin Flynn) in Tron (1982)
3.7 Viewer at an Arbitrary Location
The previous section dealt with the case where the viewer is initially located at the
standard position. This section looks at the more general problem where the viewer is
located at an arbitrary point B =( a, b, c ), looking in a given direction D =( d, e, f )
(Figure 3.32a). The approach taken here is to transform the viewer to the standard
position in three simple steps: (1) translate the viewer from B to the origin (the screen
is also translated by the same amount; Figure 3.32b); (2) rotate the viewer-screen unit in
three dimensions until D coincides with (0 , 0 , 1) (i.e., it points in the positive z direction,
Figure 3.32c), and (3) translate the viewer and screen from the origin to point (0 , 0 ,
k )
(Figure 3.32d). These three transformations bring the viewer to the standard position
and the screen to the xy plane. The same transformations are then applied to every
point P of the image, thereby bringing the viewer and the image to the same relative
positions they had before the transformations. One way to understand this approach is
to imagine that the viewer and all the image points are transformed as one unit, such
that the viewer ends up at the standard position. Another way to look at this approach
is to imagine that we transform the coordinate axes (Section 1.5), while the viewer and
the image are not moved.
Now that the viewer is located at the standard position, matrix T p [Equation (3.4)]
can be used to project image points. This approach has the advantage that all the image
points are projected on the xy plane, so that the projected points are effectively two-
dimensional. In practice, there is no need to actually transform the viewer and the
Search WWH ::




Custom Search