Title: Viewing
1Chapter 5
2Perspective Projection
3Parallel Projection
4Orthographic Projection
- Projectors are orthogonal to projection surface
5Multiview Orthographic Projection
- Projection plane parallel to principal face
- Usually form front, top, side views
isometric (not multiview orthographic view)
front
in CAD and architecture, we often display three
multiviews plus isometric
side
top
6Perspective Projection
- Projectors coverge at center of projection
7Vanishing Points
- Parallel lines (not parallel to the projection
plan) on the object converge at a single point in
the projection (the vanishing point) - Drawing simple perspectives by hand uses these
vanishing point(s)
vanishing point
8Three-Point Perspective
- No principal face parallel to projection plane
- Three vanishing points for cube
9Two-Point Perspective
- On principal direction parallel to projection
plane - Two vanishing points for cube
10One-Point Perspective
- One principal face parallel to projection plane
- One vanishing point for cube
11Computer Viewing
- There are three aspects of the viewing process,
all of which are implemented in the pipeline, - Positioning the camera
- Setting the model-view matrix
- Selecting a lens
- Setting the projection matrix
- Clipping
- Setting the view volume
12Viewing APIs
13Simple Perspective
- Center of projection at the origin
- Projection plane z d, d lt 0
14Perspective Equations
- Consider top and side views
xp
yp
zp d
15Homogeneous Coordinate Form
M
consider q Mp where
? p
q
16Perspective Division
- However w ? 1, so we must divide by w to return
from homogeneous coordinates - This perspective division yields
- the desired perspective equations
xp
yp
zp d
17Orthogonal Projections
- The default projection in the eye (camera) frame
is orthogonal - For points within the default view volume
- Most graphics systems use view normalization
- All other views are converted to the default view
by transformations that determine the projection
matrix - Allows use of the same pipeline for all views
xp x yp y zp 0
18Homogeneous Coordinate Representation
xp x yp y zp 0 wp 1
pp Mp
M
In practice, we can let M I and set the z term
to zero later
19Hidden-Surface Removal
20Z-Buffer Algorithm
- Keep track of the smallest depth or z value for
each pixel - Z value is initialized to the farthest distance
- Worst-case time complexity is O(n), where n is
the number of polygons
21Culling
- Removing all the faces pointing away from the
viewer. For example, rendering n cubes with
culling can filter 3n polygons
22Parallel-Projection Matrices
Orthographic projection of distorted object
Perspective View
23Normalization
- Rather than derive a different projection matrix
for each type of projection, we can convert all
projections to orthogonal projections with the
default view volume - This strategy allows us to use standard
transformations in the pipeline and makes for
efficient clipping
24Orthogonal Normalization
-1
-1
-1
1
1
1
normalization ? find transformation to
convert specified clipping volume to default
Canonical view volume
25Normalization Transformation
distorted object projects correctly
original clipping volume
original object
new clipping volume