Graphics Programs Reference
In-Depth Information
The three quantities α ,0,and β that appear at the top of the rightmost column of
matrix T correspond to elements p , q ,and r of the general 4
4 transformation matrix.
They tell us which of the three coordinate axes is intercepted by the projection plane.
In our case, the first and third quantities are nonzero (except for θ =0and θ =90 ),
which implies that the new projection plane intercepts the x and z axes. Page 110 has
more to say about elements p , q ,and r .
×
Exercise 3.14: Calculate the values of matrix (3.7) for the three special cases θ =0 ,
45 ,and90 .
Exercise 3.15: Given the point P =( βl, m,−αl ), calculate its projection. Explain the
result!
Exercise 3.16: Imagine rotating the viewer, who is now at (
), a second
time,byanangle φ about the x axis (Figure 3.28b). The new position of the viewer is
kα, 0 ,
10
0
(
kα, 0 ,
)
0 os φ
sin φ
0 in φ
cos φ
=(
k sin θ,
k cos θ sin φ,
k cos θ cos φ )
=( kα,
kβγ,
kβδ ) ,
where γ =sin φ and δ =cos φ . Derive the projection matrix for this case using steps
similar to the ones above.
Exercise 3.17: After two rotations, the viewer may be located at any point in space.
This is still not the most general case because there is another constraint. What is it?
It is important to realize that matrix (3.7) isn't as useful as it may seem at first.
It generates the coordinates of projected points, but those coordinates are on the plane
αx =
βz . In practice, we want to display the projected points on the screen, which is
two-dimensional, so we have to go through another step. We have to define two local
axes on αx =
βz and then figure out the coordinates of the projected points relative
to those axes. This is why the approaches discussed in the remainder of this chapter
are preferable. They project points onto the xy plane, where they effectively have just
two coordinates. Before looking at these approaches, however, here is a short summary
of the method used in this section.
Summary . The method of this section proceeds in the following steps:
1. Derive the equation of the projection plane.
2. Determine the equation of the line segment connecting an arbitrary point P on
the object to the viewer (see Equation (Ans.7)).
3. Locate the intersection point of the line and the plane.
4. Convert the coordinates of the intersection point to screen coordinates.
It is possible to use these steps to figure out the projection matrix for the general
case where the viewer may be located at any point B , looking in an arbitrary given
Search WWH ::




Custom Search