Graphics Reference
In-Depth Information
different than the angle between the left and right side clipping planes, then the two angles are iden-
tified as the vertical angle of view and the horizontal angle of view . The far clipping distance sets the
distance beyond which data are not viewed. This is used, for example, to avoid processing arbitrarily
complex data that is too far away to have much, if any, impact on the final image. The near clipping
distance similarly sets the distance before which data are not viewed. This is primarily used to avoid
division by zero in the perspective projection. These define the view frustum , the six-sided volume of
world space containing data that need to be considered for display.
The view specification discussed above is somewhat simplified. Other view specifications use an
additional vector to indicate the orientation of the projection plane, allow an arbitrary viewport to be
specified on the plane of projection that is not symmetrical about the view direction to allow for off-
center projections, and allow for a parallel projection. The reader should refer to standard graphics texts
such as the one by Foley et al. [ 2 ] for an in-depth discussion of such view specifications.
In preparation for the perspective transformation, the data points defining the objects are usually
transformed from world space to eye space .In eye space , the observer is positioned along the z -axis
with the line of sight made to coincide with the z -axis. This allows the depth of a point, and therefore
perspective scaling, to be dependent only on the point's z -coordinate. The exact position of the observer
along the z -axis and whether the eye space coordinate system is left- or right-handed vary from
text to text. For this discussion, the observer is positioned at the origin looking down the positive z -axis
in left-handed space. In eye space as in world space, lines of sight emanate from the observer position
and diverge as they expand into the visible view frustum, whose shape is often referred to as a truncated
pyramid .
The perspective transformation transforms the objects' data points from eye space to image space .
The perspective transformation can be considered as taking the observer back to negative infinity
in z and, in doing so, makes the lines of sight parallel to each other and to the (eye space) z -axis.
The pyramid-shaped view frustum becomes a rectangular solid, or cuboid, whose opposite sides
are parallel. Thus, points that are farther away from the observer in eye space have their x - and
y -coordinates scaled down more than points that are closer to the observer. This is sometimes referred
to as perspective foreshortening . This is accomplished by dividing a point's x - and y -coordinates by the
point's z -coordinate. Visible extents in image space are usually standardized into the
1to
þ
1 range in
x and y and from 0 to 1 in z (although in some texts, visible z is mapped into the
1 range). Image
space points are then scaled and translated (and possibly rotated) into screen space by mapping
the visible ranges in x and y (
1to
þ
1) into ranges that coincide with the viewing area defined in
the coordinate system of the window or screen; the z -coordinates can be left alone. The resulting series
of spaces is shown in Figure 2.4 .
Ray casting (ray tracing without generating secondary rays) differs from the above sequence of
transformations in that the act of tracing rays from the observer's position out intoworld space implicitly
accomplishes the perspective transformation. If the rays are constructed in world space based on pixel
coordinates of a virtual frame buffer positioned in front of the observer, then the progression through
spaces for ray casting reduces to the transformations shown in Figure 2.5 . Alternatively, data can be
transformed to eye space and, through a virtual frame buffer, the rays can be formed in eye space.
In any case, animation is typically produced by one or more of the following: modifying the position
and orientation of objects in world space over time, modifying the shape of objects over time, mod-
ifying display attributes of objects over time, transforming the observer position and orientation in
world space over time, or some combination of these transformations.
1to
þ
Search WWH ::




Custom Search