Graphics Reference
In-Depth Information
Y-axis
mouse click is
(x ndc , y ndc , 0)
on near plane
(x ndc , y ndc , z ndc )
is a line
NDC
Cube
X-axis
exists at
(x ndc , y ndc , -1)
on far plane
Z-axis
Figure 15.12.
DC point is an NDC ray.
NDC-to-EC transform. Remember that the NDC cube is transformed from a
view frustum. Figure 15.13 shows the view frustum in EC space and the corre-
sponding NDC cube. From this figure, we see that
transforms
←→
p n p n
p e p e
and
transforms
←→
p n p n
p e p e .
We see that line segments that are parallel to the z -axis in NDC space transform
into projection rays in EC space. Let
p n
x n ,
y n ,
z n ) ,
=(
p n
x n ,
y n ,
z n ) ,
=(
p e
x e ,
y e ,
z e ) ,
=(
p e
x e ,
y e ,
z e ) .
=(
In general,
y e
y n =
y e
y n ,
or
y n y e
y e =
y n .
(15.7)
In Figure 15.13,
y n
=
1
.
0
,
(15.8)
y e
=
n tan
( α ) ,
Search WWH ::




Custom Search