Graphics Reference
In-Depth Information
y
y
A '
AB
B '
z
z
z 52 1/4
Figure 13.10: The standard perspective view volume at left (with a near clipping plane
at z = 1 / 4 ) contains a small square, which is transformed into a parallelogram in the
parallel view volume at right.
Applying this transformation has no impact on the final results of our render-
ing because the perspective projection (i.e., ( x , y , z )
z ,1 ) ) of a shape
in the pre-transformed volume is the same as the parallel projection ( ( x , y , z )
( x
/
z , y
/
( x , y ,1 ) ) of the transformed shape in the post-transformed volume. This is easy to
see if we look at a two-dimensional slice of the situation, just the yz -plane. Con-
sider, for instance, the small square shown in Figure 13.10 that occupies the mid-
dle half of a perspective view of the scene. Occlusion (which points are obscured
by others) is determined by the ordering of points along rays from the viewpoint
into the scene so that the point B is obscured by the near edge of the square. After
transformation, that ray from the viewpoint into the scene becomes a ray in the
z direction; once again, the point B is obscured by the front edge of the square.
And once again, the transformed square ends up filling the middle half of the par-
allel view of the scene. The essential underlying fact is that light (the underlying
agent of vision) travels in straight lines, and the transformation we'll build con-
verts straight lines to straight lines (and in particular, the projection rays from the
perspective view to projection rays for the parallel view).
Recall from Section 11.1.1 that a projective transformation on R 3 can be writ-
ten as a linear transformation on R 4 (the homogeneous-coordinate representation
of points in 3-space), followed by the homogenizing transformation
H ( x , y , z , w )= x
w ,1 .
y
w ,
z
w ,
(13.14)
Letting c = n f denote the z -coordinate of the front clipping plane after trans-
formation to the standard perspective view volume (here at last the parameter n is
being used!), we'll simply write down the linear transformation from perspective
to parallel, which we call M pp :
10
0
0
10
0
0
01
0
0
01
0
0
M pp =
=
.
001
/
( 1 + c )
c
/
( 1 + c )
00 f
/
( f
n ) n
/
( f
n )
00
1
0
00
1
0
(13.15)
 
Search WWH ::




Custom Search