Viewing
Viewing
We can now put a variety of graphical information into our world, and we can describe how we
would like these objects to appear, but we do not yet have a method for specifying exactly which
of these objects should appear on the screen. Just as what we record in a photograph depends on
where we point the camera and what lens we use, we have to make similar viewing decisions in
our program.
Once we have specified both the scene and the camera, we can compose an image. The camera
forms an image by exposing the film, whereas the computer system forms an image by carrying
out a sequence of operations in its pipeline. The application program needs to worry only about
the specification of the parameters for the objects and the camera, just as the casual photographer
is concerned about the resulting picture, not about how the shutter works or the details of the
photochemical interaction of film with light.
There are default viewing conditions in computer image formation that are similar to the settings
on a basic camera with a fixed lens. However, a camera that has a fixed lens and sits in a fixed
location forces us to distort our world to take a picture. We can create pictures of elephants only
if we place the animals sufficiently far from the camera, or we can photograph ants only if we
put the insects relatively close to the lens. We prefer to have the flexibility to change the lens to
make it easier to form an image of a collection of objects. The same is true when we use our
graphics system.
There are two reasons for examining classical viewing. First, many of the jobs that were
formerly done by hand drawing such as animation in movies, architectural rendering, drafting,
and mechanical-parts design are now routinely done with the aid of computer graphics.
Practitioners of these fields need to be able to produce classical views such as isometrics,
elevations, and various perspectives and thus must be able to use the computer system to produce
such renderings. Second, the relationships between classical and computer viewing show many
advantages of, and a few difficulties with, the approach used by most APIs.
We have objects, a viewer, projectors, and a projection plane (Figure 5.1). The projectors meet at
the center of projection (COP). The COP corresponds to the center of the lens in the camera or in
the eye, and in a computer graphics system, it is the origin of the camera frame for perspective
views.
Both classical and computer graphics allow the viewer to be an infinite distance from the objects.
Note that as we move the COP to infinity, the projectors become parallel and the COP can be
replaced by a direction of projection (DOP). Note also that as the COP moves to infinity, we can
leave the projection plane fixed and the size of the image remains about the same, even though
the COP is infinitely far from the objects. Views with a finite COP are called perspective views;
views with a COP at infinity are called parallel views. For parallel views, the origin of the
camera frame usually lies in the projection plane.
Classical Viewing
When an architect draws an image of a building, she knows which side she wishes to display and
thus where she should place the viewer in relationship to the building. Each classical view is
determined by a specific relationship between the objects and the viewer. In classical viewing,
there is the underlying notion of a principal face. The types of objects viewed in real-world
applications, such as architecture, tend to be composed of a number of planar faces, each of
which can be thought of as a principal face. For a rectangular object, such as a building, there are
natural notions of the front, back, top, bottom, right, and left faces. In addition, many real-world
objects have faces that meet at right angles; thus, such objects often have three orthogonal
directions associated with them. Figure 5.3 shows some of the main types of views. We start
with the most restrictive view for each of the parallel and perspective types, and then move to the
less restrictive conditions.
Orthographic Projections
Our first classical view is the orthographic projection shown in Figure 5.4. In all orthographic (or
orthogonal) views, the projectors are perpendicular to the projection plane. In a multiview
orthographic projection, we make multiple projections, in each case with the projection plane
parallel to one of the principal faces of the object.
Perspective Viewing
All perspective views are characterized by diminution of size. When objects are moved farther
from the viewer, their images become smaller. This size change gives perspective views their
natural appearance; however, because the amount by which a line is foreshortened depends on
how far the line is from the viewer, we cannot make measurements from a perspective view.
Hence, the major use of perspective views is in applications such as architecture and animation,
where it is important to achieve natural-looking images. In the classical perspective views, the
viewer is located symmetrically with respect to the projection plane and is on the perpendicular
from the center of projection, as shown in Figure 5.9. Thus, the pyramid determined by the
window in the projection plane and the center of projection is a symmetric or right pyramid. This
symmetry is caused by the fixed relationship between the back (retina) and lens of the eye for
human viewing, or between the back and lens of a camera for standard cameras, and by similar
fixed relationships in most physical situations.
HIDDEN-SURFACE REMOVAL
Before introducing a few additional examples and extensions of viewing, we need to deepen our
understanding of the hidden-surface-removal process. Let’s start with the cube we have been
using in our examples. When we look at a cube that has opaque sides, depending on its
orientation, we see only one, two, or three front-facing sides. From the perspective of our basic
viewing model, we can say that we see only these faces because they block the projectors from
reaching any other surfaces.
From the perspective of computer graphics, however, all six faces of the cube have been
specified and travel down the graphics pipeline; thus, the graphics system must be careful about
which surfaces it displays. Conceptually, we seek algorithms that either remove those surfaces
that should not be visible to the viewer, called hidden surface removal algorithms, or find
which surfaces are visible, called visible surface algorithms.