Graphics Programs Reference
In-Depth Information
the right direction, and finally taking a snapshot. The last operation, taking a snapshot,
is done by computing the perspective projections of all the object's points and plotting
the points on the projection plane. The resulting image on the projecting plane then
becomes the next animation frame, and the final animation is screened at a fast rate
(typically 18 to 24 frames per second) to create the illusion of smooth animation.
Because animation is such an important application of perspective projection, we
often use the term “screen” instead of “projection plane.” The main difference between
a screen and a plane is that the former has a finite size, whereas the latter is infinitely
large. In order to derive the mathematics of general perspective, we need to know at
least (1) the location B of the viewer, (2) the direction D of the viewer's line of sight,
and (3) the coordinates of all the points P on the object. Figure 3.27 illustrates another
complication that often arises. The figure shows viewers located at the same point
and looking in the same direction, but with screens that have different orientations
(although each is perpendicular to the line of sight). Thus, in order to fully specify the
viewer-screen unit, we sometimes also need to specify the direction T of the top of the
screen.
T
T
z
z
z
y
y
y
x
x
x
Figure 3.27: General Perspective with Different Screen Orientations.
We start this section with a simple example that illustrates how rotation and trans-
lation, combined with basic concepts from geometry, can be applied to the computation
of perspective projection. Similar computations can be carried out in other cases, but
they are normally very messy. Future sections of this chapter illustrate better ap-
proaches to the problem of general perspective.
In this example, we assume that the viewer has been moved from the standard
position by a translation and his line of sight has been rotated. (It is also possible to first
rotate the viewer and then translate him.) We compute the new location and direction
of the viewer and use this information to compute the equation of the projection plane.
(Alternatively, we can determine the new equation of the projection plane by applying
to it the same transformations applied to the viewer.) Once this equation is known, we
compute the straight segment P ( t ) that connects the object point P to the viewer. The
final step is to calculate the point P ( t 0 ) where this segment intercepts the projection
plane. This point is the projection P of P .
In the example, we rotate the viewer θ degrees counterclockwise about the y axis
from the positive z to the positive x direction (Figure 3.28a). The viewer ends up at
point
 
Search WWH ::




Custom Search