Graphics Reference
In-Depth Information
Next, apply the projective transformation with homogeneous matrix M persp , where
100 0
010 0
0011
000 1
Ê
ˆ
Á
Á
Á
˜
˜
˜
M
persp =
.
(4.9)
d
Ë
¯
To see exactly what the map defined by M persp does geometrically, consider the lines
ax + z =-d and ax - z = d in the plane y = 0. Note that (x,y,z,w) M persp = (x,y,z,(z/d)+w).
In particular,
(
)
(
)
00
,,
-
dM
,
1
=
00
,,
-
d
,
0
persp
2
ax
d
d
ax
d
a
d
ax
Ê
Á
ˆ
˜
Ê
Ë
ˆ
¯
(
)
x
,,
0
--
d
ax
,
1
M
=
x
,,
0
-
d
-
ax
,
-
=-
-
,,
0
d
+
,
1
persp
2
ax
d
d
ax
Ê
Á
d
a
d
ax
ˆ
˜
Ê
Ë
ˆ
¯
(
)
x
,,
0
-+
d
ax
,
1
M
=
x
, ,
0
-
d
+
ax
,
=
, ,
0
d
-
,.
persp
This shows that the camera at (0,0,-d) has been mapped to “infinity” and the two lines
have been mapped to the lines x¢=-d/a and x¢=d/a, respectively, in the plane y = 0.
See Figure 4.11. In general, lines through (0,0,-d) are mapped to vertical lines through
their intersection with the x-y plane. Furthermore, what was the central projection
from the point (0,0,-d) is now an orthogonal projection of R 3 onto the x-y plane. It
follows that the composition of M tr and M persp maps the camera off to “infinity,” the
near clipping plane to z = d (1 - d/d n ), and the far clipping plane to z = d (1 - d/d f ).
The perspective projection problem has been transformed into a simple orthographic
projection problem (we simply project (x,y,z) to (x,y,0)) with the clip volume now being
[
] ¥-
[
] ¥-
[
(
)
(
)
]
-
11
,
bb
,
d
1
dd
,
d
1
-
dd
.
f
n
Figure 4.11.
Mapping the camera to infinity.
Search WWH ::




Custom Search