Graphics Reference
In-Depth Information
14.7 3D NDC-to-2D Device Transform
As discussed in Section 14.3 (Equation (14.2)), projection transform is the last
stage of the transformation pipeline. The right side of Figure 14.20 shows that the
final results of the transformation pipeline are unevenly scaled objects in the NDC
rectangular cube. As illustrated in Figure 14.22, during rendering, the graphics
API will automatically collapse all objects from 3D NDC space into the 2D image
(near) plane. Notice that in the NDC space, the xy -plane is parallel to the applica-
tion drawing area (image plane), and the z -direction is perpendicular to the image
plane. For this reason, the collapsing of objects from 3D NDC to 2D image plane
involves the following two steps.
1. TransformNDC
(
x ndc ,
y ndc )
to the drawing area device (with dimensions of
W dc ×
H dc ). In Section 10.1, we studied the requirements of this transfor-
mation:
x dc y dc = x ndc y ndc M n 2 d ,
where M n 2 d is defined by Equation (10.6) (on p. 264):
S W dc
T W dc
H dc
2
H dc
2
M n 2 d =
2 ,
2 ,
.
NDC
Rectangle
Near (Image)
Plane
teapot
tiger
floor
Collapse objects
from: 3D NDC
to: 2D image plane
Objects in 3D
NDC Space
Figure 14.22. Collapsing objects in 3D NDC to 2D DC space .
Search WWH ::




Custom Search