Parallel Projection
Angel Figure 5.4
Center of projection is at infinityCenter of projection is at infinity
•Direction of projection (DOP) same for all pointsDirection of projection (DOP) same for all points
DOP
View
Plane
Orthographic Projections
Angel Figure 5.5
Top Side
Front
DOP perpendicular to view planeDOP perpendicular to view plane
Oblique Projections
H&B
DOP DOP notnot perpendicular to view plane perpendicular to view plane
Cavalier
(DOP a = 45
o
)
tan(a) = 1
Cabinet
(DOP a = 63.4
o
)
tan(a) = 2
45=f
4.63=f
Orthographic Projection
Simple OrthographicSimple Orthographic
TransformationTransformation
Original world units are preservedOriginal world units are preserved
•Pixel units are preferredPixel units are preferred
Perspective Transformation
First discovered by Donatello, Brunelleschi, and DaVinci First discovered by Donatello, Brunelleschi, and DaVinci
during Renaissanceduring Renaissance
Objects closer to viewer look largerObjects closer to viewer look larger
Parallel lines appear to converge to single pointParallel lines appear to converge to single point
Perspective Projection
Angel Figure 5.10
3-Point
Perspective
2-Point
Perspective
1-Point
Perspective
How many vanishing points?How many vanishing points?
Perspective Projection
In the real world, objects exhibit In the real world, objects exhibit perspective perspective
foreshorteningforeshortening: distant objects appear : distant objects appear
smallersmaller
The basic situation:The basic situation:
Perspective Projection
When we do 3-D graphics, we think of the When we do 3-D graphics, we think of the
screen as a 2-D window onto the 3-D world:screen as a 2-D window onto the 3-D world:
How tall should
this bunny be?
Perspective Projection
The geometry of the situation is that of The geometry of the situation is that of similar trianglessimilar triangles. .
View from above:View from above:
What is x’ ?What is x’ ?
d
P (x, y, z)X
Z
View
plane
(0,0,0)
x’ = ?
Perspective Projection
Desired result for a point Desired result for a point [[x, y, z, 1x, y, z, 1]]
TT
projected onto the projected onto the
view plane:view plane:
What could a matrix look like to do this?What could a matrix look like to do this?
dz
dz
y
z
yd
y
dz
x
z
xd
x
z
y
d
y
z
x
d
x
==
×
==
×
=
==
,','
'
,
'
A Perspective Projection Matrix
Answer:Answer:
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
=
0100
0100
0010
0001
d
M eperspectiv
A Perspective Projection Matrix
Example:Example:
Or, in 3-D coordinates:Or, in 3-D coordinates:
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
=
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
10100
0100
0010
0001
z
y
x
ddz
z
y
x
÷
÷
ø
ö
ç
ç
è
æ
d
dz
y
dz
x
,,
Projection Matrices
Now that we can express perspective Now that we can express perspective
foreshortening as a matrix, we can compose it foreshortening as a matrix, we can compose it
onto our other matrices with the usual matrix onto our other matrices with the usual matrix
multiplicationmultiplication
End result: a single matrix encapsulating End result: a single matrix encapsulating
modeling, viewing, and projection transformsmodeling, viewing, and projection transforms
Perspective vs. Parallel
Perspective projectionPerspective projection
+Size varies inversely with distance - looks realisticSize varies inversely with distance - looks realistic
–Distance and angles are not (in general) preservedDistance and angles are not (in general) preserved
–Parallel lines do not (in general) remain parallelParallel lines do not (in general) remain parallel
Parallel projectionParallel projection
+Good for exact measurementsGood for exact measurements
+Parallel lines remain parallelParallel lines remain parallel
–Angles are not (in general) preservedAngles are not (in general) preserved
–Less realistic looking Less realistic looking
Classical Projections
Angel Figure 5.3
A 3D Scene
Notice the presence ofNotice the presence of
the camera, thethe camera, the
projection plane, and projection plane, and
the worldthe world
coordinate axescoordinate axes
Viewing transformations define how to acquire the image Viewing transformations define how to acquire the image
on the projection planeon the projection plane
Q1
Using the origin as the centre of projection, derive Using the origin as the centre of projection, derive
the perspective transformation onto the plane the perspective transformation onto the plane
passing through the point Rpassing through the point R
00(x(x
00,y,y
00,z,z
00) and having ) and having
normal vector N=nnormal vector N=n
11i+ni+n
22j+nj+n
33kk
A1
P(x,y,z) is projected onto P’(x’,y’,z’)P(x,y,z) is projected onto P’(x’,y’,z’)
x’=x’=ααx, y’= x, y’= ααy , z’= y , z’= ααzz
nn
11x’+nx’+n
22y’+ny’+n
33z’=d (where d=nz’=d (where d=n
11xx
00+n+n
22yy
00+n+n
33zz
00))
αα=d/(=d/(nn
11x+nx+n
22y+ny+n
33z)z)
d 0 0 0d 0 0 0
PerPer
N,R0N,R0= 0 d 0 0= 0 d 0 0
0 0 d 00 0 d 0
nn
1 1 nn
22 n n
33 0 0
Q2
Find the perspective projection onto the view Find the perspective projection onto the view
plane z=d where the centre of projection is the plane z=d where the centre of projection is the
origin(0,0,0)origin(0,0,0)
Q3
Derive the general perspective transformation Derive the general perspective transformation
onto a plane with reference point Ronto a plane with reference point R
00(x(x
00,y,y
00,z,z
00), ),
normal vector N=nnormal vector N=n
11i+ni+n
22j+nj+n
33k, and using C(a,b,c) as k, and using C(a,b,c) as
the centre of projectionthe centre of projection
A3
PerPer
N,R0’N,R0’=T=T
CC. Per. Per
N,R0 N,R0 .T.T
-C-C
Q4
Derive parallel projection onto xy plane in the Derive parallel projection onto xy plane in the
direction of projection V=ai+bj+ckdirection of projection V=ai+bj+ck