Graphics Reference
In-Depth Information
is governed by the dimensions of the application window and is indepen-
dent of the values we used for the M w 2 n operator.
These observations indicate that, in fact, our 300
300 design space need not
be related to the application window size. Indeed, the D3D internal NDC space
helped separate M w 2 n and M n 2 d into independent operators, where
×
M w 2 n
−→
M n 2 d
−→
.
Design space
NDC
DC
As application programmers, we only need to be concerned with the M w 2 n oper-
ator, which is independent of the DC!
10.3.1
Design Space versus Drawing Area
Tutorial 10.6. DC-Independent Design Space
Tutorial 10.6.
Project Name:
D3D _ XformListCoordSpace
Library Support:
UWB _ MFC _ Lib1
UWB _ D3D _ Lib9
Goal. Verify that the 300
300 design space of Figure 9.21 is indeed inde-
pendent of the dimensions of the UI drawing area.
×
Approach. Change the dimension of the UI drawing area to 500
×
500 and
observe the output.
Figure 10.9 is a screenshot of running Tutorial 10.6. Although the UI front end
of this tutorial appears to be significantly different from that of Tutorial 9.9, these
two tutorials have identical back-end implementations! The only significant dif-
ference is that in this case, the UI drawing area is 500
500 pixels. From the
output of this tutorial, we see a larger but the same geometric face as the one
observed in Tutorial 9.9. In this tutorial, we display a 300
×
×
300 design space
in a 500
500 drawing area; we have verified that our design space is indeed
independent of the device dimensions.
In computer graphics, we refer to the 300
×
Figure 10.9.
Running
300 coordinate space where we
designed the original face the world coordinate space or the world coordinate
system (WC). The world refers to the fact that the geometric objects within this
space are the world that we would like to draw onto the output display area. We
observe that as long as we correctly construct the M w 2 n operator (or the WC-to-
NDC operator), we can select to work in any convenient WC space.
×
Tutorial 10.6.
10.3.2
Working with a Convenient WC Space
It is important to select a design space or the WC such that it is convenient to
specify our geometric objects. For example, in anticipation of specifying the full-
Figure 10.10. A full-
figure geometric person.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search