lecture 11 perspective projection
DESCRIPTION
perspective projection theory and questionsTRANSCRIPT
Projections
Angel: Interactive ComputerGraphics
Road in perspective
Taxonomy of Projections
FVFHP Figure 6.10
Taxonomy of Projections
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
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
ViewPlane
Orthographic Projections
Angel Figure 5.5
Top Side
Front
DOP perpendicular to view planeDOP perpendicular to view planeDOP perpendicular to view planeDOP perpendicular to view plane
Oblique Projections
H&B
DOP DOP notnot perpendicular to view plane perpendicular to view planeDOP DOP notnot perpendicular to view plane perpendicular to view plane
Cavalier
(DOP = 45o)
tan() = 1
Cabinet
(DOP = 63.4o)
tan() = 2
45 4.63
Orthographic Projection
Simple OrthographicSimple OrthographicTransformationTransformation
Original world units are preservedOriginal world units are preserved• Pixel units are preferredPixel units are preferred
Simple OrthographicSimple OrthographicTransformationTransformation
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
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-PointPerspective
2-PointPerspective
1-PointPerspective
How many vanishing points?How many vanishing points?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:
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:
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 shouldthis 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’ ?
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
Viewplane
(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?
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?
dzdz
y
z
ydy
dz
x
z
xdx
z
y
d
y
z
x
d
x
,','
',
'
A Perspective Projection Matrix
Answer:Answer: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:
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
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. ParallelPerspective 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
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 ofthe camera, thethe camera, theprojection plane, and projection plane, and the worldthe worldcoordinate 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
Notice the presence ofNotice the presence ofthe camera, thethe camera, theprojection plane, and projection plane, and the worldthe worldcoordinate 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 R00(x(x00,y,y00,z,z00) and having ) and having
normal vector N=nnormal vector N=n11i+ni+n22j+nj+n33kk
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 R00(x(x00,y,y00,z,z00) and having ) and having
normal vector N=nnormal vector N=n11i+ni+n22j+nj+n33kk
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
nn11x’+nx’+n22y’+ny’+n33z’=d (where d=nz’=d (where d=n11xx00+n+n22yy00+n+n33zz00))
αα=d/(=d/(nn11x+nx+n22y+ny+n33z)z)
d 0 0 0d 0 0 0
PerPerN,R0N,R0= 0 d 0 0= 0 d 0 0
0 0 d 00 0 d 0
nn1 1 nn22 n n33 0 0
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
nn11x’+nx’+n22y’+ny’+n33z’=d (where d=nz’=d (where d=n11xx00+n+n22yy00+n+n33zz00))
αα=d/(=d/(nn11x+nx+n22y+ny+n33z)z)
d 0 0 0d 0 0 0
PerPerN,R0N,R0= 0 d 0 0= 0 d 0 0
0 0 d 00 0 d 0
nn1 1 nn22 n n33 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)
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 R00(x(x00,y,y00,z,z00), ),
normal vector N=nnormal vector N=n11i+ni+n22j+nj+n33k, and using C(a,b,c) as k, and using C(a,b,c) as
the centre of projectionthe centre of projection
Derive the general perspective transformation Derive the general perspective transformation onto a plane with reference point Ronto a plane with reference point R00(x(x00,y,y00,z,z00), ),
normal vector N=nnormal vector N=n11i+ni+n22j+nj+n33k, and using C(a,b,c) as k, and using C(a,b,c) as
the centre of projectionthe centre of projection
A3
PerPerN,R0’N,R0’=T=TCC. Per. PerN,R0 N,R0 .T.T-C-CPerPerN,R0’N,R0’=T=TCC. Per. PerN,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+ckDerive 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
A4
x’-x=ka , y’-y=kb , z’-z=kcx’-x=ka , y’-y=kb , z’-z=kc
K=-z/c (z=0 on xy plane)K=-z/c (z=0 on xy plane)
1 0 -a/c1 0 -a/c
ParParVV= 0 1 -b/c= 0 1 -b/c
0 0 0 0 0 0
x’-x=ka , y’-y=kb , z’-z=kcx’-x=ka , y’-y=kb , z’-z=kc
K=-z/c (z=0 on xy plane)K=-z/c (z=0 on xy plane)
1 0 -a/c1 0 -a/c
ParParVV= 0 1 -b/c= 0 1 -b/c
0 0 0 0 0 0