0% found this document useful (0 votes)
23 views

Week 8 Projection

The document discusses 3D viewing and projection techniques. It describes setting up a viewing coordinate system and different projection models including parallel and perspective projections. It also covers topics like depth cueing, normalization transformations, and 3D viewing pipelines.

Uploaded by

Tanya Jindal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Week 8 Projection

The document discusses 3D viewing and projection techniques. It describes setting up a viewing coordinate system and different projection models including parallel and perspective projections. It also covers topics like depth cueing, normalization transformations, and 3D viewing pipelines.

Uploaded by

Tanya Jindal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Projection

Overview

• First, set up viewing (or


camera) coordinate
reference
– The position and
orientation for a view
plane (or projection
plane) that corresponds
to a camera film plane

Fig: Coordinate reference for


obtaining a selected view of a three-
dimensional scene.
Projections

• Parallel projection
– As used in engineering
and architectural Fig: Three parallel-projection views of an
object, showing relative proportions from
drawings different viewing positions.
– Shows accurate
dimensions
• Perspective projection
– Objects far away are
shown smaller than
nearby same size objects
Depth Cueing

• Depth info is important to identify


viewing direction
– Depth cueing: Vary the brightness of
lines according to distance
3D Viewing Pipeline

• Choose a viewing
position (place the
camera)
• Decide on camera
orientation
– Direction and rotation
(up direction)

Fig: Photographing a scene involves


selection of the camera position and
orientation.
3D Viewing Pipeline

• Some viewing operations in 3D are same as in


2D
– 2D viewport, 2D clipping window, etc.
• Some are different
– Even though clipping window is 2D on the view
plane, the scene is clipped against a volume (view
volume)
3D Viewing Pipeline

Fig: General three-dimensional transformation pipeline, from modeling


coordinates (MC) to world coordinates (WC) to viewing coordinates (VC) to
projection coordinates (PC) to normalized coordinates (NC) and, ultimately, to
device coordinates (DC).
3D Viewing-Coordinate Parameters

• Select
– View point (or viewing
position, eye position,
camera position)
P0=(x0,y0,z0)
– View-up vector V to
define yview
– Direction to define zview

Fig: A right-handed viewing-coordinate


system, with axes x view, y view, and z view,
relative to a right-handed world-
coordinate frame.
The View-Plane Normal Vector

• Viewing direction is along


zview axis
• So, view plane (or projection
plane) is normally
perpendicular to this axis
• Orientation of the view
plane (and direction of
positive zview axis) can be
defined by a view-plane
normal vector N
Fig: Orientation of the view plane and
view-plane normal vector N.
The View-Plane Normal Vector

• Then, a scalar
parameter is used to set
the position of the view
plane at coordinate zvp
along zview axis

Fig: Three possible positions for the


view plane along the z view axis.
The View-Up Vector

• After view plane normal N,


we choose a direction for
view-up vector V (used to
determine positive yview)
• V should be perpendicular
to N
– Viewing routines typically
adjust user-defined V
• Often, V=(0,1,0) is a
convenient choice
Fig: Adjusting the input direction of the
view-up vector V to an orientation
perpendicular to the view-plane normal
vector N.
Transformation from World
to Viewing Coordinates

• Translate viewing coordinate origin (P0) to the world


coordinate origin
1 0 0  x0 
0 1 0  y0 
T 
0 0 1  z0 
 
0 0 0 1 
• Align xview, yview, zview with xw, yw, zw
u x uy uz 0
v vy vz 0
R x
nx ny nz 0
 
0 0 0 1
Transformation from World
to Viewing Coordinates

• The transformation matrix is the product of these


translation and rotation matrices
u x uy uz  u  P0 
v vy vz  v  P0 
M WC ,VC  R T   x
nx ny nz  n  P0 
 
0 0 0 1 
Projection Transformations

• In parallel projection,
coordinate positions are
transferred to view plane
along parallel lines
– orthogonal/orthographic
– oblique
• For perspective projection,
coordinates are transferred
to view plane along lines
that converge at a point
Orthogonal Projections

• Projection along lines


parallel to the view-
plane normal N
• Front, side, rear
orthogonal projections
are often called
elevations
• The top one is called
plan view
Fig: Orthogonal projections of an
object, displaying plan and elevation
views.
Axonometric and Isometric
Orthogonal Projections .
• Orthogonal projections
which show more than one
face of an object are called
axonometric orthogonal
projections
• Isometric: Most common
axonometric o.p.s that are
generated by aligning
projection plane so that it
intersects principal axes at
the same distance from
origin
Orthogonal Projection Coordinates

• If projection direction is
parallel to zview
– xp=x, yp=y

• z coordinate is kept for


visibility detection
procedures

Fig: An orthogonal projection of a


spatial position onto a view plane.
Clipping Window and Orthogonal Projection
View Volume

• Edges of the clipping


window specify the x and y
limits
• These are used to form the
top, bottom, and two sides
of a clipping region called
the orthogonal-projection
view volume
• Limit the volume in zview
direction by near-far (or
front-back) clipping planes
Fig: A finite orthogonal view volume with the view plane “in
front” of the near plane.
Normalization Transformation for
an Orthogonal Projection
• mapping coordinates into a normalized view volume
with coordinates in the range -1 to 1
 2 xwmax  xwmin 
 xw  xw 0 0 
xwmax  xwmin 
 max min

 2 ywmax  ywmin 
0 0 
M ortho,norm   ywmax  ywmin ywmax  ywmin 
 2 znear  z far 
 0 0 
 znear  z far znear  z far 
 0 0 0 1 
 
Oblique Parallel Projections

• Projection path is not


perpendicular to view
plane
• It can be defined with a
vector direction
• The effect is same as z-
axis shearing
transformation
Fig: An oblique parallel projection of
a cube, shown in a top view (a),
produces a view (b) containing
multiple surfaces of the cube.
Fig: Top view of an oblique parallel-projection transformation. The oblique
view volume is converted into a rectangular parallelepiped, and objects in the
view volume, such as the green block, are mapped to orthogonal-projection
coordinates.
Perspective Projections

• Project objects to view


plane along converging
paths to projection
reference point (or
center of projection)

Fig: A perspective projection of two


equal-length line segments at
different distances from the view
plane.
Perspective Projections
x'  x  ( x  x prp )u If it is at origin
y '  y  ( y  y prp )u 0  u 1
 zvp   zvp 
z '  z  ( z  z prp )u x p  x  y p  y 
On the viewplane, z’=zvp. Solve this for u  z   z 
zvp  z
u
z prp  z
Substitute this u into x’ and y’ equations
 z prp  zvp   z z 
x p  x   x prp  vp 
 z z  z z
 prp   prp 
 z prp  zvp   z z 
y p  y   y prp  vp 
 z z  z z
 prp   prp 

If projection reference point is on zview


 z prp  zvp   z prp  zvp 
x p  x  y p  y 
 z z   z z 
 prp   prp 

Fig: A perspective projection of a point P with coordinates (x, y,


z) to a selected projection reference point. The intersection
position on the view plane is (xp, yp, zvp ).
Fig: A perspective-projection view of an object is upside down when the
projection reference point is between the object and the view plane.
Fig: Changing perspective effects by moving the projection
reference point away from the view plane.
Vanishing Points

• Lines parallel to view plane are


still parallel
• But, other lines parallel to each
other are now converging
• The point such lines converge at
are vanishing points
• Vanishing points for lines parallel
to principal axes are principal
vanishing points
• How many principal v.p.s can be
seen depends on projection plane
orientation
– 1-point, 2-point, or 3-point
projections
Perspective Projection View Volume

• An infinite pyramid of
vision is chopped off by
near and far clipping
planes and we get a
truncated pyramid (or
frustum)
Perspective-Projection
Transformation Matrix
• Cannot directly apply a matrix and get the result
• 2 steps are required
– First, calculate the homogeneous coordinates using
perspective projection matrix
• Ph=Mpers P
– Then, after normalization and clipping, divide by h
(homogeneous parameter, h=zprp-z)
• sz (scaling) and tz (translation)  z prp  zvp 0  x prp x prp z prp 
 z prp  zvp  y prp y prp z prp 
factors for normalizing projected z M pers 
0
coordinate values (they depend on  0 0 sz tz 
 
the selected normalization range  0 0 1 z prp 
Symmetric Perspective
Projection Frustum
• If the line from perspective
reference point through clipping
window center (centerline) is
perpendicular to view plane, we
have a symmetric frustum
• Clipping window can be specified
by
– width and height, or
– field-of-view angle and aspect ratio
• With a symmetric frustum,
perspective transformation is a
mapping to orthogonal
coordinates (figure on next slide)
Fig: A symmetric frustum view volume is mapped to an
orthogonal parallelepiped by a perspective-projection
transformation.
Oblique Perspective-Projection Frustum

• Centerline not
perpendicular to view
plane
• First, transform this into
a symmetric frustum (z-
axis shearing)
• Then proceed as before

You might also like