13 Projection
13 Projection
• Projectors/sightlines
One-point Oblique Orthographic
Parallel Two-point
Cavalier Axonometric Multiview
Three-point
Cabinet
Isometric top, bottom,
General front, back,
Dimetric left, right
Parallel Perspective
Trimetric
Lozano-Perez01 Perspective
Multiview Axonometric Orthographic
Orthographic Axonometric:
• projection plane is not parallel to any coordinate plane
• projection direction perpendicular to projection plane
Isometric:
• preserves lengths
• projection plane parallel to one
along 3 principal axes
coordinate plane (project onto • principal axes make
plane by dropping coordinate the same angle with
• preserves ratios,
perpendicular to plane) each other (120º)
but not angles ( not visible)
• projection direction perpendicular • parallel lines remain parallel
to projection plane is considered 120º 120º
• good for exact measurements an affine transform 120º
(CAD, architecture) James07
Are we done?
Yes, but we’ve lost depth (z) information, can’t do: Map it to cvv:
• hidden surface removal
• lighting, etc.
Need to preserve z dimension!
map view volume to canonical view volume
Akenine-Möller & Haines 02 Shirley02
Orthographic Projection Setup Orthographic Projection
From an arbitrary axis-aligned
Simple case: view volume axis-aligned with world bounding box to canonical view volume
coordinate system • translate and scale:
• the view volume is in negative z, n > f
p 3 − p1 p 4 − p 2 p1 − p 3 p4 − p2
p 3 − p 2 p 4 − p1 p1 − p 2 p4 − p3
deMenthon
Seitz08 James07
P
m
l
o
x2 x1
Hulsey James07 deMenthon
Homogeneous Coordinates Perspective Divide
The ray p = (x1, x2, x3) and (λx1, λx2, λx3) How do we “land” back from the projective world to
are the same and are mapped to the same point m in P the 2D Cartesian world of the plane?
• p is the coordinate vector of m, • for point, consider the intersection of ray p = (λx1, λx2, λx3)
(x1, x2, x3) its homogeneous coordinates
with the plane x3 = 1 λ = 1/x3, m = (x1 / x3, x2 / x3, 1)
The planes (A, B, C) and (λA, λB, λC) are the same • for line, intersection of plane Ax1 + Bx2 + Cx3 = 0 with the
and are mapped to the same line l in P plane x3 = 1 is line l = Ax1 + Bx2 + C = 0
• L is the coordinate vector of l,
(A, B, C) its homogeneous coordinates x3 x3
L = (A, B, C) p = (x1, x2, x3) Called “perspective divide” L = (A, B, C) p = (x1, x2, x3)
Point p’ is on line L if L•p’ = 0 p’ P P
m For the mathematically m
l l
inclined, or studying
computer vision: what’s
(A, B, C) the geometric interpretation (A, B, C )
o o
x1 of x3 = 0? x1
x2 deMenthon
x2 deMenthon
w=2
deMenthon, Durand08 Seitz08
Vanishing Points Perspective Projection
What happens to two parallel lines that are not
parallel to the projection plane? Given the coordinates of the orange point
The parametric equation for find the coordinates of the green point
y
a line is: ⎡ p ⎤ ⎡ v ⎤ y' y
tan θ = =
x x
⎢ ⎥ ⎢ ⎥
⎢ p ⎥ ⎢ v ⎥ d z
l = p + tv = ⎢ y ⎥ + t ⎢ y ⎥ y
⎢ p z ⎥ ⎢ vz ⎥ y' = y d z y’
z θ
⎢⎣ 1 ⎥⎦ ⎢⎣ 0 ⎥⎦ e g
Is perspective projection simply: d view plane
After perspective transform:
At the limit, with t ∞, we get
(x, y, z, 1) (xd/z, yd/z, d, 1),
⎡ px + tvx ⎤
⎡ p' ⎤ ⎡ px + tvx ⎤ ⎢ d ⎥
pz + tvz ⎥ a point! [(vx/vz)d, (vy/vz)d, 1]T then map to screen by throwing z
⎢ x ⎥ ⎢ ⎥ ⎢
⎢ p' y ⎥=⎢ py + tvy after
⎥ ⎯perspective
⎯⎯⎯ →⎢ py + tvy ⎥ away the z-coordinate: (xd/z, yd/z, 1)?
⎢ ⎥ ⎢ ( p + tv ) / d ⎥ divide ⎢ d ⎥
⎣ w ⎦ ⎢⎣ z z ⎥⎦ ⎢ pz + tvz ⎥ Each set of parallel lines
⎢ 1 ⎥ intersect at a vanishing point
! ⎣ ⎦