Graphics Programs Reference
In-Depth Information
There is no need to consider the orientation of the object because each point P on the
object is projected separately. Starting in Section 3.5, this treatment is generalized and
we show how to project an object on any projection plane and with the viewer located
anywhere and looking in an arbitrary direction.
The discussion of perspective and of converging lines earlier in this chapter implies
that we are looking for a transformation T that satisfies the following conditions:
1. As the object is moved away from the projection plane, its projection shrinks.
This corresponds to the well-known fact that distant objects appear small.
2. The projection of a distant object features less perspective, as illustrated by
Figure 3.11. The reader may claim that the projection of a distant object is too small
to be seen, so the loss of perspective may not matter, but the point is that we can look
at a distant object through a telescope. This brings the object closer, so it looks big,
but there is still loss of perspective.
3. Any group of straight parallel lines on the object seems to converge to a vanishing
point, except if the lines are perpendicular to the line of sight of the viewer. This rule
of vanishing points is stated and discussed in Section 3.1.
The remainder of this section derives the special case of perspective projection in
four steps as follows:
1. We describe the special case and state the rule of projection.
2. The mathematical expressions are derived using just similar triangles.
3. We show that this rule satisfies the three requirements above.
4. We include this rule in the general three-dimensional transformation matrix.
This produces a 4
4 matrix that can be used to transform the points of an object and
also project them on a plane.
Step 1 .
×
The special case discussed in this section places the viewer at point
k ), where k , a positive real number, is a parameter selected by the user. The
viewer looks in the positive z axis, so the line of sight is the vector (0 , 0 , 1). Finally, the
projection plane is the xy plane. In order for the projection to make sense, we state
again that the viewer and the object must be on different sides of the projection plane,
which implies that all the points of the object must have nonnegative z coordinates.
[The points will normally have positive z coordinates, but they may also be of the form
( x, y, 0); i.e., located on the projection plane.]
This special case is referred to as the standard position (Figure 3.20a) and is men-
tioned often in this topic. The rule of perspective projection is a special case of the
general rule of projection (page 2) where the center of projection is at the viewer. Thus,
in order to project point P , we compute the line segment that connects P to the viewer
at point (0 , 0 ,
(0 , 0 ,
k ) and place the projected point P where this segment intercepts the
xy plane. (The segment always intercepts the xy plane because the object and the
viewer are located on opposite sides of the plane.) Because the projection plane is the
xy plane, the coordinates of the projected point are ( x ,y , 0), indicating that it is
two-dimensional.
It is important to realize that the viewer and the projection plane constitute a single
unit and have to be moved and rotated together. This is illustrated in Figure 3.20b
and especially in Figure 3.21a, which shows the viewer-plane unit moving around the
Search WWH ::




Custom Search