Sunteți pe pagina 1din 29

159.

235 Graphics 1
159.235 Graphics & Graphical
Programming
Lecture 24 - Projections - Part 1

159.235 Graphics 2
Projections - Outline
3D Viewing
Coordinate System & Transform Process
Generalised Projections
Taxonomy of Projections
Perspective Projections

159.235 Graphics 3
3D Viewing
Inherently more complex than 2D case.
Extra dimension to deal with
Most display devices are only 2D
Need to use a projection to transform 3D
object or scene to 2D display device.
Need to clip against a 3D view volume.
Six planes.
View volume probably truncated pyramid

159.235 Graphics 4
Coordinate Systems & Transform
Process
Object coordinate systems.
World coordinates.
View Volume
Screen coordinates.
Raster
Transform
Project
Clip
Rasterize
159.235 Graphics 5
Generalised Projections.
Transforms points in a coordinate system of dimension n
into points in one of less than n (ie 3D to 2D)
The projection is defined by straight lines called
projectors.
Projectors emanate from a centre of projection, pass
through every point in the object and intersect a
projection surface to form the 2D projection.
159.235 Graphics 6
Projections.
In graphics we are generally only interested in planar
projections where the projection surface is a plane.
Most cameras employ a planar film plane.
But the retina is not a plane - future devices such as
direct retina devices may need more complex projections
We will only deal with geometric projections the
projectors are straight lines.
Many projections used in cartography are either non-
geometric or non-planar.
Exception Image-based rendering - advanced topic
159.235 Graphics 7
Projections.
Henceforth refer to planar geometric projections as just:
projections.
Two classes of projections :
Perspective.
Parallel.
A
B
A'
B'
A
B
A'
B'
Centre of
Projection.
Centre of
Projection
at infinity
Parallel
Perspective
Parallel
159.235 Graphics 8
A Taxonomy of Projections
Planar geometric projections.
Parallel Perspective
Orthographic Oblique 1 point
2 point
3 point
Axonometric
Isometric
Cavalier Cabinet
Elevations
159.235 Graphics 9
Perspective Projections.
Defined by projection plane and centre of projection.

Visual effect is termed perspective foreshortening.
The size of the projection of an object varies inversely with
distance from the centre of projection.
Similar to a camera - Looks realistic !

Not useful for metric information
Parallel lines do not in general project as parallel.
Angles only preserved on faces parallel to the projection
plane.
Distances not preserved

159.235 Graphics 10
Perspective
The first ever painting
(Trinity with the Virgin,
St. J ohn and Donors)
done in perspective by
Masaccio, in 1427.
159.235 Graphics 11
Perspective Projections
A set of lines not parallel to
the projection plane
converge at a vanishing
point.
Can be thought of in 3D as the
projection of a point at
infinity.
Homogeneous coordinate is 0
(x,y,0)
159.235 Graphics 13
Perspective Projections
z
x
y
Projection plane
x
z
y
Lines parallel to a principal axis converge at an axis
vanishing point.
Categorized according to the number of such points
Corresponds to the number of axes cut by the projection plane.
159.235 Graphics 14
1-Point Projection
Projection plane cuts 1
axis only.
159.235 Graphics 15
1-Point Perspective
A painting (The
Piazza of St. Mark,
Venice) done by
Canaletto in 1735-
45 in one-point
perspective

159.235 Graphics 16
2-Point Perspective
y
z
x
Projection plane
159.235 Graphics 17
2-Point Perspective
Painting in two point
perspective by
Edward Hopper
The Mansard Roof
1923 (240 Kb);
Watercolor on paper,
13 3/4 x 19 inches;
The Brooklyn
Museum, New York

159.235 Graphics 18
3-Point Perspective
Generally held to add little beyond 2-point perspective.
y
z
x
Projection plane
A painting (City
Night, 1926) by
Georgia O'Keefe, that
is approximately in
three-point
perspective.
159.235 Graphics 19
Intro to Projections -Summary
3D Viewing
Coordinate System & Transform Process
Generalised Projections
Taxonomy of Projections
Perspective Projections Clipping can be done in image
space if more efficient application dependent.

Parallel Projections next
Acknowledgement - Thanks to Eric McKenzie, Edinburgh, from whose Graphics
Course some of these slides were adapted.
159.235 Graphics 20
Parallel Projections
Specified by a direction to the centre of projection,
rather than a point.
Centre of projection at infinity.
Orthographic
The normal to the projection plane is the same as the
direction to the centre of projection.
Oblique
Directions are different.

159.235 Graphics 21
Orthographic Projections
Most common orthographic
Projection :

Front-elevation,
Side-elevation,
Plan-elevation.

Angle of projection parallel to
principal axis; projection plane
is perpendicular to axis.

Commonly used in technical
drawings

159.235 Graphics 22
Axonometric Orthographic Projections
Projection plane not normal to principal axis
Show several faces of the object at once
Foreshortening is uniform rather than being
related to distance
Parallelism of lines is preserved
Angles are not
Distances can be measured along each principal
axis ( with scale factors )

159.235 Graphics 23
Isometric Projection
Most common axonometric projection
Projection plane normal makes equal
angles with each axis.
i.e normal is (d
x
,d
y
,d
z
), |d
x
| = |d
y
|=|d
z
|
Only 8 directions that satisfy this
condition.
159.235 Graphics 24
Isometric Projection
Normal
x
z
y
Projection
Plane
y
z x
120
120
120
All 3 axes equally foreshortened
- measurements can be made
- Hence the name iso-metric
159.235 Graphics 25
Oblique projections.
Projection plane normal differs from the direction
of projection.
Usually the projection plane is normal to a
principal axis.
Projection of a face parallel to this plane allows
measurement of angles and distance.
Other faces can measure distance, but not angles.
Frequently used in textbooks : easy to draw !
159.235 Graphics 26
Oblique projection
x
z
y
Projection
Plane
Normal
Parallel to x axis
159.235 Graphics 27
Geometry of Oblique Projections
Projection plane is x,y plane

L=1/tan(|)

|- angle between normal and projection
direction

- Determines the type of projection

o is choice of horizontal angle.

Given a desired L and o,
Direction of projection is

(L.coso, L.sino,-1)

z
y
x
P
L
P=(0,0,1)
L.sino
L.coso
o
|
159.235 Graphics 28
Geometry of Oblique Projections
Point P=(0,0,1) maps to:
P=(l.coso, l.sino, 0) on xy plane,
and P(x,y,z) onto P(x
p
,y
p
,0)
) sin (
) cos (
o
o
l z y y
l z x x
p
p
+ =
+ =
(
(
(
(

=
1 0 0 0
0 0 0 0
0 sin 1 0
0 cos 0 1
o
o
l
l
M
ob
and
159.235 Graphics 29
Mathematics of Viewing
Need to generate the transformation
matrices for perspective and parallel
projections.
Should be 4x4 matrices to allow general
concatenation.
And theres still 3D clipping and more
viewing stuff to look at.
159.235 Graphics 30
Projections - Summary
Orthographic matrix - replace (z) axis with
point.
Perspective matrix multiply w by z.
Clip in homogeneous coordinates.
Preserve z for hidden surface calculations.
Can find number of vanishing points.

Acknowledgments - thanks to Eric McKenzie, Edinburgh, from whose
Graphics Course some of these slides were adapted.

S-ar putea să vă placă și