Graphics Programs Reference
In-Depth Information
cos θ
sin θ
01 0
sin θ
0
=(
(0 , 0 ,
k )
k sin θ, 0 ,
k cos θ )=(
kα, 0 ,
) ,
(3.6)
0 θ
where α =sin θ and β =cos θ (notice that α 2 + β 2 = 1). We select a general point
P =( l, m, n ) on the object and compute its projection P on the new projection plane.
Notice that the new projection plane is still perpendicular to the line of sight of the
viewer and is still at a distance of k units. It is no longer identical to the xy plane, but
it still contains the origin.
x
x z
Projection plane
P
θ
y
φ
θ
z
(a)
(b)
Figure 3.28: Viewer Rotated About the y Axis.
Exercise 3.12: The previous paragraph talks about rotating the viewer counterclock-
wise, but Equation (3.6) looks like Equation (1.4), which generates clockwise rotation.
What's the explanation?
)
is perpendicular to the plane (it is the normal to the plane), so it is perpendicular to
any general vector ( x, y, z ) on the plane. This is why their dot product is zero. From
(
The first task is to find the equation of the projection plane. Vector (
kα, 0 ,
kα, 0 ,
)
( x, y, z ) = 0, we obtain the plane equation αx =
βz .
Exercise 3.13: Why doesn't this equation involve y ?
An alternate way to derive the plane equation is to start with the equation of the
original plane and transform it by means of Equation (3.6). The original plane was the
xy plane, whose equation is z = 0. A general point on this plane has coordinates ( a, b, 0).
When multiplied by the rotation matrix of Equation (3.6), the point is transformed to
( βa, b,
αa ). Thus, a general point ( x, y, z ) on the new plane has an x coordinate that's
the product of an arbitrary number a and cos θ ,a z coordinate that's the product of
thesamenumber a and sin θ , and an arbitrary y coordinate. The relation between
the coordinates can therefore be expressed as z =
αa =
α ( x/β )or αx =
βz .
Next, we find the equation of the line segment from the viewer to point P .We
use the parametric representation P ( t )=( P 2
P 1 ) t + P 1 [Equation (Ans.7)]. When
 
Search WWH ::




Custom Search