Graphics Reference
In-Depth Information
Y
a
b
(
a
+
b
,
c
+
d
)
D
C
(
b, d
)
d
B
A
E
(
a, c
)
c
F
G
X
(0, 0)
a
b
Fig. 7.30.
The inner parallelogram is the transformed unit square.
The second 2D transform encodes a scaling of 3 and a translation of (3, 3),
and results in an overall area scaling of 9:
⎡
⎤
303
033
001
⎣
⎦
and the determinant is
3
−
0
+0
33
01
03
01
03
33
=9
These two examples demonstrate the extra role played by the elements of a
matrix.
7.10 Perspective Projection
Of all the projections employed in computer graphics, the
perspective projec-
tion
is the one most widely used. There are two stages to its computation:
the first stage involves converting world coordinates to the camera's frame of
reference, and the second stage transforms camera coordinates to the projec-
tion plane coordinates. We have already looked at the transforms for locating
a camera in world space, and the inverse transform for converting world co-
ordinates to the camera's frame of reference. Let's now investigate how these
camera coordinates are transformed into a perspective projection.
We begin by assuming that the camera is directed along the
z
-axis as
shown in Figure 7.31. Positioned
d
units along the axis is a projection screen,