3D-viewing-transform.PDF
Transcript of 3D-viewing-transform.PDF
-
7/27/2019 3D-viewing-transform.PDF
1/37
3D Viewing
Projections
AProjectors
Projection PlaneCenter of
Projection
B
B
A
Perspective
-
7/27/2019 3D-viewing-transform.PDF
2/37
3D Viewing
Projections
Parallel
Projectors
Projection PlaneAt Infinity
A
B
A
B
-
7/27/2019 3D-viewing-transform.PDF
3/37
3D Viewing
Parallel Projections
Orthographic
Side ViewFront View
Top View
Z X
Y
-
7/27/2019 3D-viewing-transform.PDF
4/37
3D Viewing
Parallel Projections
Multiviews
(x=0 or y=0 or z=0 planes),
one View is not adequate
True size and shape for lines
On z=0 plane
Orthographic
=
1000
0000
0010
0001
P
-
7/27/2019 3D-viewing-transform.PDF
5/37
3D Viewing
Parallel Projections
Orthographic
-
7/27/2019 3D-viewing-transform.PDF
6/37
3D Viewing
Parallel Projections
Axonometric
Additional rotation,translation and then
projection on z=0 plane
[ ][ ] [ ]
=
=
10
10
10
1100
1010
1001
**
**
**
zz
yy
xx
yx
yx
yx
TTU
2*2*2*2*2*2* ;; zzzyyyxxx yxfyxfyxf +=+=+=
-
7/27/2019 3D-viewing-transform.PDF
7/37
3D Viewing
Parallel Projections
Three types Trimetric: No foreshortening is the same.
Dimetric: Two foreshortenings are the same.
Isometric: All foreshortenings are the same.
Axonometric
-
7/27/2019 3D-viewing-transform.PDF
8/37
3D Viewing
Parallel Projections
Trimetric
zyx fff Dimetric
zy ff =Isometric
zyx fff ==
Axonometric
-
7/27/2019 3D-viewing-transform.PDF
9/37
3D Viewing
Parallel Projections
Isometric
Let there be 2 rotations a) about y-axis b) about x-axis
=
1000
0000
0010
0001
1000
0cossin0
0sincos0
0001
1000
0cos0sin
0010
0sin0cos
T
-
7/27/2019 3D-viewing-transform.PDF
10/37
3D Viewing
Parallel Projections
Isometric
Let there be 2 rotations a) about y-axis b) about x-axis
=
100000sincossin
00cos0
00sinsincos
T
-
7/27/2019 3D-viewing-transform.PDF
11/37
3D Viewing
Parallel Projections
[ ][ ]
=
=
10sincossin
10cos0
10sinsincos
1000
00sincossin
00cos0
00sinsincos
1100
10101001
TU
Isometric
-
7/27/2019 3D-viewing-transform.PDF
12/37
3D Viewing
Parallel Projections
sincossin
cos
sinsincos
2222*2*2
22*2*2
2222*2*2
yxf
yxf
yxf
zzz
yyy
xxx
+=+=
=+=
+=+=
Isometric
-
7/27/2019 3D-viewing-transform.PDF
13/37
3D Viewing
Parallel Projections
ff
ffffff
zy
yx
zyx
2222
2222
cossincossin
cossinsincos
=+=
=+====
Solving equations find , and f
Isometric
-
7/27/2019 3D-viewing-transform.PDF
14/37
3D Viewing
Parallel Projections
Oblique
Non-perpendicular projectorsto the plane of projection
True shape and size for the
faces parallel to the projection
plane is preserved
-
7/27/2019 3D-viewing-transform.PDF
15/37
3D Viewing
Parallel Projections
Oblique
-
7/27/2019 3D-viewing-transform.PDF
16/37
3D Viewing
Parallel Projections
Oblique
P(x,y,z)
P(x,y)
P(xp,yp)
z
x
y
xp = x + L cos yp = y + L sin
tan =z/L or L = z cotL
-
7/27/2019 3D-viewing-transform.PDF
17/37
3D Viewing
Parallel Projections
Oblique
P(x,y,z)
P(x,y)
P(xp,yp)
z
x
y
L
When =45o => CavalierLines perpendicular to the
projection plane are notforeshortened
When cot = => CabinetLines perpendicular to the
projection plane are
foreshortened by half
is typically 300 or 450
-
7/27/2019 3D-viewing-transform.PDF
18/37
3D Viewing
Perspective Projections
Parallel lines converge
Non-uniform
foreshortening
Helps in depth
perception, important
for 3D viewing
Shape is not preserved
AProjectors
Projection PlaneCenter ofProjection
B
B
A
-
7/27/2019 3D-viewing-transform.PDF
19/37
3D Viewing
Perspective Projections
-
7/27/2019 3D-viewing-transform.PDF
20/37
3D Viewing
Perspective Projections
Matrix Form
[ ] [ ]
[ ] +++=
+=
11111
1
1000
100
00100001
1
***rz
z
rz
y
rz
xzyx
rzzyxr
zyx
-
7/27/2019 3D-viewing-transform.PDF
21/37
3D Viewing
Perspective Projections
Matrix Form
Projection on z=0 plane
[ ][ ]
[ ]
++=
===
1011
11000
0000
0010
0001
1000
100
0010
0001
***
rz
y
rz
xzyx
rPPPT zrrz
-
7/27/2019 3D-viewing-transform.PDF
22/37
3D Viewing
Perspective Projections
Geometrically
Z
P(x,y,z) X
Y
P*(x*,y*)
zc
y
l2
l1 y*
c
c
c
z
z
yy
ll
l
zz
z
ll
y
l
y
=
=
=
1
,
*
12
2
122
*
-
7/27/2019 3D-viewing-transform.PDF
23/37
3D Viewing
Perspective Projections
Geometrically
Z
P(x,y,z) X
Y
P*(x*,y*)
zc
l2
l1xx*
zc
c
cc
zz
xx
zz
x
z
x
=
=
1
**
When r = - 1/ zc this becomes same
as obtained in matrix form
-
7/27/2019 3D-viewing-transform.PDF
24/37
3D Viewing
Perspective Projections
Vanishing Point
Set of parallel lines not parallel to the projection plane
converge to Vanishing Point
VPzY
Z
X
-
7/27/2019 3D-viewing-transform.PDF
25/37
3D Viewing
Perspective Projections
Vanishing Point
Point at infinity on +Z axis :
(homogenous)[ ]0100
[ ] [ ]
[ ][ ] [ ]11001
100
1000
100
0010
0001
0100
***
'''
rzyx
r
rwzyx
==
=
Recall r = -1/zc, the vanishing point is at zc
-
7/27/2019 3D-viewing-transform.PDF
26/37
3D Viewing
Perspective Projections
Single Point Perspective
[ ] [ ]
[ ]
+++=
+=
11111
1
1000
0100
0010001
1
***
px
z
px
y
px
x
zyx
pxzyx
p
zyx
COP on X-axis
COP (-1/p 0 0 1) VPx (1/p 0 0 1)
-
7/27/2019 3D-viewing-transform.PDF
27/37
3D Viewing
Perspective Projections
Single Point Perspective
[ ] [ ]
[ ]
+++=
+=
11111
1
1000
0100
0100001
1
***
qy
z
qy
y
qy
x
zyx
qyzyxq
zyx
COP on Y-axis
COP (0 -1/q 0 1) VPx (0 1/q 0 1)
-
7/27/2019 3D-viewing-transform.PDF
28/37
3D Viewing
Perspective Projections
Two Point Perspective
[ ][ ]
==
1000
0100
010
001
q
p
PPP qppq
-
7/27/2019 3D-viewing-transform.PDF
29/37
3D Viewing
Perspective Projections
Three Point Perspective
[ ]
=
=
1000
100
010
001PP qp
r
q
pPP rpqr
-
7/27/2019 3D-viewing-transform.PDF
30/37
3D Viewing
Perspective Projections
-
7/27/2019 3D-viewing-transform.PDF
31/37
3D Viewing
Generation of Perspective Views
Additional transformation and then single point
perspective transformation
Simple Translation:Translation (l,m,n),COP=zc ,Projection plane z=0
+
=
=
rnmlrr
nml
T
10000
0010
0001
1000000
0010
0001
10100
0010
0001
-
7/27/2019 3D-viewing-transform.PDF
32/37
3D Viewing
Generation of Perspective Views
X
Y
Translation along y=x line:
-
7/27/2019 3D-viewing-transform.PDF
33/37
3D Viewing
Generation of Perspective Views
Translation in Z => Scaling
COP
Projection plane
-
7/27/2019 3D-viewing-transform.PDF
34/37
3D Viewing
Generation of Perspective Views
Rotation
[ ][ ]
==
1000
000
0010
0001
1000
0cos0sin
0010
0sin0cos
r
PRT rzy
Rotation about Y-axis by
-
7/27/2019 3D-viewing-transform.PDF
35/37
3D Viewing
Generation of Perspective Views
Rotation
Rotation about Y-axis by
[ ][ ]
==
1000
cos00sin
0010
sin00cos
r
r
PRT rzy
=> Two Point Perspective Transformation
-
7/27/2019 3D-viewing-transform.PDF
36/37
3D Viewing
Generation of Perspective Views
Rotation
Two Rotations a) about Y-axis by
b) about X-axis by[ ][ ]
=
=
1000
000
0010
0001
1000
0cossin0
0sincos0
0001
1000
0cos0sin
0010
0sin0cos
r
PRRT rzxy
-
7/27/2019 3D-viewing-transform.PDF
37/37
3D Viewing
Generation of Perspective Views
=
1000
coscos0sincossin
sin0cos0
cossin0sinsincos
r
r
r
T
Two Rotations a) about Y-axis by
b) about X-axis by
Rotation
=> Three Point Perspective Transformation