Graphics Reference
In-Depth Information
camera, whose x -axis goes to the right side of the camera (as seen from the back),
whose y -axis points up along the back of the camera, and whose negative z -axis
points along the camera view. All objects in world space have coordinates in this
coordinate system as well; these coordinates are called camera-space coordi-
nates or simply camera coordinates. Computing these camera-space coordinates
from world coordinates is relatively simple (Chapter 13) and is one of the services
typically provided by a graphics platform.
These camera coordinates are transformed into normalized device coordi-
nates, in which the visible objects have floating-point xy -values between
1
and 1, and whose z -coordinate is nonpositive. (Objects with xy -values outside this
range are outside the camera's field of view; objects with z
0 are behind the
camera rather than in front of it.) Finally, the visible fragments are transformed
to pixel coordinates, which are integers (with ( 0, 0 ) being the upper-left corner
of the display and ( 1280, 1024 ) being the lower-right corner of the display) by
scaling and rounding the xy -coordinates. These resultant numbers are sometimes
said to be coordinates in image space. Returning to the cube that's to be used as
one of a pair of dice, we want each side of the cube to look like the side of a die.
To do this, we might use a texture map containing a picture of each side of a die.
The vertices 9 of each face of the cube will then also be given texture coordinates
indicating what portion of the texture should be applied to them (see Figure 1.16).
>
Figure 1.16: The vertices of each of the six faces of the die (shown in an exploded view) are
assigned texture coordinates (a few are indicated by the arrows in the diagram); the texture
image is then used to determine the appearance of each face of the die, as if the texture
were a rubber sheet stretched onto the face. Note that a single 3D location may have many
texture coordinates associated to it, because it is part of many different faces. In the case
of the die, this is moot, because all instances of the 3D point get the same texture color
assigned. Chapter 20 discusses topics like this at greater length. The resultant textured die
is shown on the right.
9. The word “vertices” (VERT-uh-sees) is the plural of “vertex,” although “vertexes”
is sometimes used. Occasionally our students mistakenly back-construct the singu-
lar “vertice.” Please avoid this. Other similarly formed plurals are index-indices and
simplex-simplices.
 
 
Search WWH ::




Custom Search