Projection
-
Upload
yoshio-hammond -
Category
Documents
-
view
41 -
download
0
description
Transcript of Projection
![Page 1: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/1.jpg)
Projection
![Page 2: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/2.jpg)
Projection
![Page 3: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/3.jpg)
Projection
Conceptual model of 3D viewing process
![Page 4: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/4.jpg)
In general, projectionsprojections transform points in a coordinate system of dimension n into points in a coordinate system of dimension less than n.
We shall limit ourselves to the projection from 3D to 2D.
We will deal with planar geometric projectionsplanar geometric projections where: The projection is onto a plane rather than a curved surface The projectors are straight lines rather than curves
Projection
![Page 5: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/5.jpg)
key terms… Projection from 3D to 2D is defined by straight projection rays
(projectors) emanating from the 'center of projection', passing through each point of the object, and intersecting the 'projection plane' to form a projection.
Projection
![Page 6: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/6.jpg)
Planer Geometric Projection
2 types of projections perspective and parallel.
Key factor is the center of projection. if distance to center of projection is finite : perspective if infinite : parallel
A
BA'
B'
Center ofprojection
Projectors
Projectionplane
Perspective projectionPerspective projection
A
BA'
B'
Center ofprojectionat infinity
Projectors
Projectionplane
Directionof
projection
Parallel projectionParallel projection
![Page 7: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/7.jpg)
Perspective v Parallel
Perspective: visual effect is similar to human
visual system... has 'perspective foreshortening'
size of object varies inversely with distance from the center of projection.
Parallel lines do not in general project to parallel lines
angles only remain intact for faces parallel to projection plane.
![Page 8: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/8.jpg)
Parallel: less realistic view because of no
foreshortening however, parallel lines remain
parallel. angles only remain intact for faces
parallel to projection plane.
Perspective v Parallel
![Page 9: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/9.jpg)
Perspective projection- anomalies
Perspective foreshorteningPerspective foreshortening The farther an object is from COP the smaller it appears
A
BA'
B'
Center ofprojection
Projectors
Projectionplane
C
D
C'
D'
Perspective foreshorteningPerspective foreshortening
![Page 10: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/10.jpg)
Vanishing Points:Vanishing Points: Any set of parallel lines not parallel to the view plane appear to meet at some point.
There are an infinite number of these, 1 for each of the infinite amount of directions line can be oriented
x
y
z
z-axis vanishing point
Vanishing pointVanishing point
Perspective projection- anomalies
![Page 11: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/11.jpg)
Perspective projection- anomalies
View Confusion:View Confusion: Objects behind the center of projection are projected upside down and backward onto the view-plane
Topological distortion: Topological distortion: A line segment joining a point which lies in front of the viewer to a point in back of the viewer is projected to a
broken line of infinite extent.
P1
P3
P'3
C
Y
X
Z
P2
P'1P'2
View Plane
Plane containingCenter of Projection (C)
![Page 12: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/12.jpg)
Vanishing Point
Vanishing Point
COP
View Plane
![Page 13: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/13.jpg)
Vanishing Point
If a set of lines are parallel to one of the three axes, the vanishing point is called an axis
vanishing point (Principal Vanishing Point).
There are at most 3 such points, corresponding to the number of axes cut by the projection
plane
One-point:
One principle axis cut by projection plane
One axis vanishing point
Two-point:
Two principle axes cut by projection plane
Two axis vanishing points
Three-point:
Three principle axes cut by projection plane
Three axis vanishing points
![Page 14: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/14.jpg)
Vanishing Point
![Page 15: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/15.jpg)
One point perspective projection of a cube X and Y parallel lines do not converge
Vanishing Point
![Page 16: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/16.jpg)
Vanishing Point
![Page 17: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/17.jpg)
Two-point perspective projection:
This is often used in architectural, engineering and industrial design drawings.
Three-point is used less frequently as it adds little extra realism to that offered by two-point perspective projection.
Vanishing Point
![Page 18: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/18.jpg)
Vanishing Point
VPL VPRH
VP1VP2
VP3
![Page 19: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/19.jpg)
Projective Transformation
y
x
z
view direction
center ofprojection
plane ofprojection
d
Settings for perspective projectionSettings for perspective projection
![Page 20: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/20.jpg)
y
P(y,z)y
z
P'(y p ,z p)
d-z
plane ofprojection
1,,,1,,, ddz
y
dz
xzyx
dz
dz
yy
d
y
z
yp
p
Projective Transformation
![Page 21: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/21.jpg)
1
/
/
1????
????
????
????
ddz
ydz
x
z
y
x
d
zz
y
x
z
y
x
1????
????
????
????
d
zz
y
x
z
y
x
d 101
00
0100
0010
0001
1
ddz
ydz
x
d
zz
y
x
divisioneperspectiv
Projective Transformation
![Page 22: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/22.jpg)
Parallel projection
2 principle types: orthographic and
oblique.
Orthographic : direction of projection =
normal to the projection plane.
Oblique : direction of projection !=
normal to the projection plane.
n
n
![Page 23: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/23.jpg)
Orthographic (or orthogonal) projections: front elevation, top-elevation and side-elevation. all have projection plane perpendicular to a principle
axes.
Useful because angle and distance measurements can be made...
However, As only one face of an object is shown, it can be hard to create a mental image of the object, even when several view are available
Orthographic projection
![Page 24: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/24.jpg)
Orthographic projection
![Page 25: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/25.jpg)
Orthogonal Projection Matrix
1
0
11000
0000
0010
0001
y
x
z
y
x
y
x
zview direction
plane ofprojection
direction ofprojection
![Page 26: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/26.jpg)
Axonometric projection
Axonometric ProjectionsAxonometric Projections use projection planes that are not normal to a principal axis.On the basis of projection projection planeplane normalnormal N = (dx, dy, dz N = (dx, dy, dz) subclasses are:
o IsometricIsometric : | dx | = dx | = | dy | = dy | = | dz |dz | i.e. NN makes equal angles with all principal axes.
o Dimetric : | dx | = dx | = | dy |dy |
o Trimetric Trimetric :: | dx | != dx | != | dy | != dy | != | dz |dz |
![Page 27: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/27.jpg)
Axonometric vs Perspective
Axonometric projection shows several faces of an object at once like perspective projection.
But the foreshortening is uniform rather than being related to the distance from the COP.
y
z
x
Projection Plane
Isometric proj
![Page 28: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/28.jpg)
Oblique parallel projection
Oblique parallel projections Objects can be visualized better then with
orthographic projections Can measure distances, but not angles
* Can only measure angles for faces of objects parallel to the plane
2 common oblique parallel projections: Cavalier and Cabinet
![Page 29: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/29.jpg)
Oblique parallel projection
n
Projection Plane Normal
Projector
Projection Plane
x
y
z
![Page 30: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/30.jpg)
Cavalier: The direction of the projection makes a 45 degree
angle with the projection plane. There is no foreshortening
Oblique parallel projection
![Page 31: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/31.jpg)
Oblique parallel projection
Cabinet: The direction of the projection makes a 63.4 degree
angle with the projection plane. This results in foreshortening of the z axis, and provides a more “realistic” view
![Page 32: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/32.jpg)
Oblique parallel projection
Cavalier, cabinet and orthogonal projections can all be specified in terms of (α, β) or (α, λ) since tan(β) = 1/λ
α
β
P=(0, 0, 1)
P׳(λ cos(α), λ sin(α),0)
λ cos(α)
λ sin(α)
λ
![Page 33: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/33.jpg)
Oblique parallel projection
=1 = 45 Cavalier projection = 0 - 360
=0.5 = 63.4 Cabinet projection = 0 – 360
=0 = 90 Orthogonal projection = 0 – 360
![Page 34: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/34.jpg)
Oblique parallel projection
PP‘ = (λ cos(α), λ sin(α),-1) = DOP
Proj(P) = (λ cos(α), λ sin(α),0)
Generally multiply by z and allow for (non-zero) x and y
x ‘ = x + z cos y‘ = y + z sin
1
.
1000
0000
0sin10
0cos01
1
0 z
y
x
y
x
x
y
),( yx
),( pp yx
sin
cos
yy
xx
p
p
![Page 35: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/35.jpg)
Generalized Projection Matrix
x or y
Center of Projection(COP)
z
P = (x, y, z)
P p = (x p , y p , z p)
(d x, d y, d z)
(0, 0, z p)
Q
Plane of Projection
zyxp
p
dddQzCOP
tCOPPtCOPP
,,,0,0
10,
zpzp
yy
xx
QdzztQdzz
QdytQdy
QdxtQdx
zyxP
,,
![Page 36: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/36.jpg)
Generalized Projection Matrix
zp
zpp
zpzpp
Qdzz
Qdzzt
QdzztQdzz
11
1
1
1
2
z
p
z
zpp
z
p
z
p
z
p
pp
z
p
z
yp
z
y
p
z
p
z
xp
z
x
p
Qd
zzQd
Qdzz
Qd
zz
Qd
zzQd
zz
zz
Qd
zzd
dz
d
dzy
y
Qd
zzdd
zdd
zx
x
![Page 37: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/37.jpg)
Generalized Projection Matrix
11
00
00
10
01
2
z
p
z
pz
p
z
p
z
yp
z
y
z
xp
z
x
gen
Qd
z
Qd
zQd
z
Qd
z
d
dz
d
dd
dz
d
d
M
1
1
1
2
z
p
pz
p
z
p
p
z
p
z
yp
z
y
p
z
p
z
xp
z
x
p
Qd
zz
zQd
z
Qd
zz
z
Qd
zzd
dz
d
dzy
y
Qd
zzdd
zdd
zx
x
![Page 38: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/38.jpg)
Generalized Projection Matrix
01
00
0100
0010
0001
1,0,0,,
d
M perddd
dQdz
zyx
p
11
00
00
10
01
2
z
p
z
pz
p
z
p
z
yp
z
y
z
xp
z
x
gen
Qd
z
Qd
zQd
z
Qd
zd
dz
d
dd
dz
d
d
M
![Page 39: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/39.jpg)
Generalized Projection Matrix
1000
0000
0010
0001
1,0,0,,0
parddd
Qz
Mzyx
p
11
00
00
10
01
2
z
p
z
pz
p
z
p
z
yp
z
y
z
xp
z
x
gen
Qd
z
Qd
zQd
z
Qd
zd
dz
d
dd
dz
d
d
M
![Page 40: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/40.jpg)
Taxonomy of Projection
![Page 41: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/41.jpg)
OpenGL’s Perspective Specification
w
h
y
xz
near
far
aspect = w / h
y field-of-view / fovyy field-of-view / fovyaspect ratioaspect ratio
near and far clipping planesnear and far clipping planesviewing frustumviewing frustum
gluPerspective(fovy, aspect, near, far)gluPerspective(fovy, aspect, near, far)
glFrustum(left, right, bottom, top, near, glFrustum(left, right, bottom, top, near, far)far)
![Page 42: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/42.jpg)
Perspective without Depth
d
zz
y
x
z
y
x
d 101
00
0100
0010
0001
1
ddz
ydz
x
d
zz
y
x
divisioneperspectiv
• The depth information is lost as the last two components are same
• But dept information of the projected points is essential for hidden surface removal and other purposes like blending, shading etc.
![Page 43: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/43.jpg)
Perspective without Depth
1
101
00
00
0010
0001
z
zddz
ydz
x
d
zz
y
x
z
y
x
d
divisioneperspectiv
z
ddz
For ß < 0, z’ is a monotonically increasing function of depth.
![Page 44: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/44.jpg)
Canonical View Volume
x
y
z
(-1,1,1)
(-1,-1,1)
(-1,1,-1)
(1,1,-1)
(1,-1,-1)
(-1,-1,-1)
(1,-1,1)
(1,1,1)
far near
11
11
11
z
y
x
![Page 45: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/45.jpg)
Canonical View Volume
There is a reversal of the z- coordinates, in the sense that before the transformation, points further from the viewer have smaller z- coordinates
y
z
z=-far
z=-near
+1
-1+1 -1
y
z viewer
z=-1 (near)z=1 (far)
![Page 46: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/46.jpg)
Perspective Matrix
The matrix to perform perspective perspective transformationtransformation:
1
)/()(
)/(
)/(
10100
00
000
000
zz
zy
zx
z
z
y
x
z
y
x
![Page 47: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/47.jpg)
Perspective Matrix
w
hθ/2
y
xz
a = w / hz = -near
z = -far
zc
z
c
azzyx
c
azyax
y
x
h
wa
c
zy
y
zc
,,,,
2cot
![Page 48: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/48.jpg)
Perspective Matrix
1,1,1,,
1,1,1,,
1,1,1,,
1,1,1,,
nc
n
c
an
nc
n
c
an
nc
n
c
an
nc
n
c
an
1,1,1,,
1,1,1,,
1,1,1,,
1,1,1,,
fc
f
c
af
fc
f
c
af
fc
f
c
af
fc
f
c
af
w
hθ/2
y
xz
a = w / hz = -near
z = -far
![Page 49: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/49.jpg)
Perspective Matrix
1
1
1
1
n
nc
nc
an
nn
ca
c
1
1
1
1
10100
00
000
000
1,1,1,,
nc
nc
an
nc
n
c
an
1
1
1
1
1n
nc
c
a
![Page 50: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/50.jpg)
Perspective Matrix
1
1
1
1
10100
00
000
000
1,1,1,,
fc
fc
af
fc
f
c
af
1
1
1
1
1f
fc
c
a
1
1
1
1
f
fc
fc
af
fn
fn
fn
nf
nn
ff
2
![Page 51: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/51.jpg)
Perspective Matrix
The matrix to perform perspective perspective transformationtransformation:
0100
200
000
000
fn
fn
fn
nfc
a
c
![Page 52: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/52.jpg)
Taxonomy of projection
![Page 53: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/53.jpg)
Generalized Projection
Using the origin as the center of projection, derive the perspective transformation onto the plane passing through the point R0(x0, y0, z0) and having the normal vector N = n1I + n2J + n3K.
x
y
z
P(x, y, z)
P'(x', y', z')
N = n1I + n2J + n3K
R0=x0 ,y0, z0
O
![Page 54: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/54.jpg)
Generalized Projection
znynxn
d
321
0
x
y
z
P(x, y, z)
P'(x', y', z')
N = n1I + n2J + n3K
R0=x0 ,y0, z0
O
P'O = α POx' = αx, y' = αy, z ' = αz
N. R0P' = 0
n1x ' + n2y ' + n3z '
=n1x0 + n2y0 + n3z0 = d0
0
000
000
000
321
0
0
0
nnn
d
d
d
Per
![Page 55: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/55.jpg)
Generalized Projection
Derive the general perspective transformation onto a plane with reference point R0 and normal vector N and using C(a,b,c) as the center of projection.
x
y
z
P(x, y, z)
P'(x', y', z')
N = n1I + n2J + n3K
R0=x0 ,y0, z0
C
![Page 56: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/56.jpg)
Generalized Projection
)()()( 321 cznbynaxn
d
P'C = α PCx' = α(x-a) + a
n1x' + n2y' + n3z‘ = d0
d = (n1x0 + n2y0 + n3z0) – (n1a + n2b + n3c)
= d0 – d1
x
y
z
P(x, y, z)
P'(x', y', z')
N = n1I + n2J + n3K
R0=x0 ,y0, z0
C
![Page 57: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/57.jpg)
Generalized Projection
Follow the steps – Translate so that C lies at the origin Per Translate back
1321
0321
0321
0321
dnnn
cdcndcncn
bdbnbndbn
adananand
![Page 58: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/58.jpg)
Generalized Projection
Find (a) the vanishing points for a given perspective transformation in the direction given by a vector U (b) principal vanishing point.
Family of parallel lines having the direction U(u1,u2,u3) can be written in parametric form as
x = u1t+p, y = u2t+q, z = u3t+r here (p, q, r) is any point on the line
Let, proj(x,y,z,1) = (x‘, y‘, z‘, h) x' = (d+an1)(u1t+p) + an2(u2t+q) + an3(u3t+r) – ad0
y' = bn1(u1t+p) + (d+bn2)(u2t+q) + bn3(u3t+r) – bd0
z' = cn1(u1t+p) + cn2(u2t+q) + (d+cn3)(u3t+r) – cd0
h = n1(u1t+p) + n2(u2t+q) + n3(u3t+r) – d1
![Page 59: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/59.jpg)
Generalized Projection
The vanishing point (xv, yv, zv) is obtained when t=α xu = (x‘/h) at t= α
= a + (du1/k)
yu = b + (du2/k)
zu = c + (du3/k)
k = N.U = n1u1 + n2u2 + n3u3
If k=0 then ? Principal vanishing point when
U = I xu = a + d / n1, yu = b, zu = c,
U = J U = k
![Page 60: Projection](https://reader038.fdocuments.net/reader038/viewer/2022110402/56812b1c550346895d8f0f04/html5/thumbnails/60.jpg)
Ref.
FV: p. 229-237, 253-258 Sch: prob. 7.1 – 7.15 Perspective Proj.pdf