Graphics Programs Reference
In-Depth Information
direction D . This approach to the computation, however, is messy because in addition
to B , D ,and k , another vector is needed to define the “up” direction of the projection
plane. In this section, we started with the “up” direction in the positive y direction.
After the two rotations, that direction has changed, but it is fully determined by the ro-
tations and does not need to be explicitly specified. Another drawback of this approach
is that points are projected on a three-dimensional plane, so they have three dimensions.
In practice, the projected image should be displayed on the computer monitor, which is
two-dimensional, so we would like the computations to produce two-dimensional points.
The following two sections show how to project points on the xy plane, which effectively
makes them two-dimensional.
Perspective, as its inventor remarked, is a beautiful thing. What horrors of damp huts,
where human beings languish, may not become picturesque through aerial distance!
What hymning of cancerous vices may we not languish over as sublimest art in the
safe remoteness of a strange language and artificial phrase! Yet we keep a repugnance
to rheumatism and other painful effects when presented in our personal experience.
—George Eliot, Daniel Deronda (1876)
3.6 Transforming the Object
The theory of special relativity teaches that movement (at a constant speed and in a
straight line) is relative, which suggests the following idea. Instead of transforming the
viewer to a new location, computing the new equation of the projection plane, and going
through all the computations of the previous section, why not leave the viewer at the
standard position and transform the object instead? After all, we are interested only
in what the viewer sees on the screen. The absolute locations of the viewer and the
object are irrelevant. If the viewer is left at the standard position, then any point on
the (transformed) object can be projected by means of matrix T p of Equation (3.4),
which greatly simplifies the computations.
This approach is ideal for cases where the viewer is located at the standard position
and has to be transformed by means of translations and/or rotations (or even reflections,
but no scaling or shearing) to a new location, where he can observe the object from
a different direction. This approach is useful, for example, in computer animation.
Suppose that we have to transform the viewer from the standard position to a new
location by means of a transformation A that consists of several translations, rotations,
and/or reflections (thus, A = T 1 · T 2 ··· T n ). Instead of this, we leave the viewer in
the standard position and apply the inverse transformation A 1 to the object. Direct
multiplication proves that the inverse A 1 of our product matrix A is given by A 1 =
T 1
n
1 (where T i is the reverse of transformation T i ). A nice feature of
this approach is that the individual T i transformations are only translations, rotations,
and reflections, and these transformations have simple inverses.
··· T 1
2
· T 1
 
Search WWH ::




Custom Search