SLIDE 1 Scaling
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1
z y x
s s s S
Non-rigid transformation Special value (-1) of scaling factor give reflection
) 1 , 1 , 1 ( ) , , (
1 z y x z y x
s s s S s s s S =
−
SLIDE 2 Rotation
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = 1 cos sin sin cos 1 θ θ θ θ Rx
X Y Z
SLIDE 3 Rotation
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = 1 1 cos sin sin cos ψ ψ ψ ψ Rz
X Y Z
SLIDE 4 Rotation
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = 1 cos sin 1 sin cos φ φ φ φ Ry
X Y Z
SLIDE 5 Rotations
) ( ) (
1
θ R θ R − =
−
) ( ) (
1
θ R θ R
T
=
−
Orthogonal Matrix Rigid Transformation
SLIDE 6 Translation
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 1 1 1 n m l T
Rigid transformation
) , , ( ) , , (
1
n m l T n m l T − − − =
−
SLIDE 7
Shear
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 1 1 1 h g f d c b S
Off diagonal elements Non-rigid transformation
SLIDE 8 Shear
X Y θ
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 1 1 1 θ θ cot ) (
yz
H z z y y θ y x x = = + = ' ' cot '
(x, y) (x’, y’)
) ( ) (
1
θ H θ H
yz yz
− =
−
SLIDE 9 Concatenation of Transformations
3 2 1 3 2 1
) ) ) ((( T T XT T T XT X' = = XT X T T T T = = '
3 2 1
Transformations: T1, T2, T3 T1 T2 T3 X X’ Alternatively, X X’ T Pipeline unit T1 T2 T3
SLIDE 10
Rotation about a fixed point
Rotation of a cube about its center (about Z-axis) X Y Z C
) ( ) ( ) ( C T θ R C XT X' − =
SLIDE 11
Rotation about an arbitrary axis
X Y Z O P Axis: P0 (x0, y0, z0), (Cx, Cy, Cz) Angle: δ OP: Unit vector O: (x0, y0, z0) Translation (-x0, -y0, -z0) Cx Cz Cy
SLIDE 12 Rotation about an arbitrary axis
X Y Z O P Axis: P0 (x0, y0, z0), (Cx, Cy, Cz) Angle: δ Rotation about X axis by α Cx Cz Cy α
d C α d C α
y z
= = sin cos
d
SLIDE 13 Rotation about an arbitrary axis
X Y Z O Axis: P0 (x0, y0, z0), (Cx, Cy, Cz) Angle: δ Rotation about X axis by α Cx d
x
C β d β = = sin cos
d β 1
SLIDE 14 Rotation about an arbitrary axis
Complete Transformation
) ( ) ( ) ( ) ( ) ( ) ( ) ( P T α R β R δ R β R α R P T M
x y z y x
− − − =
SLIDE 15
General
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = s n m l r i h g q f e d p c b a S
SLIDE 16
Projections
A
Projectors Projection Plane Center of Projection
B B’ A’
Perspective
SLIDE 17
Projections
Parallel
Projectors Projection Plane At Infinity
A’ B’ A B
SLIDE 18
Parallel Projections
Orthographic
Side View Front View Top View Z X Y
SLIDE 19 Parallel Projections
(x=0 or y=0 or z=0 planes),
- ne View is not adequate
- True size and shape for lines
On z=0 plane Orthographic ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 1 1 P
SLIDE 20
Parallel Projections
Orthographic
SLIDE 21 Parallel Projections
Axonometric
- Additional rotation,translation and then
projection on z=0 plane
[ ][ ] [ ]
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 1 1 1 1 1 1 1 1
* * * * * * z z y y x x
y x y x y x T T U
2 * 2 * 2 * 2 * 2 * 2 *
; ;
z z z y y y x x x
y x f y x f y x f + = + = + =
SLIDE 22 Parallel Projections
Three types
- Trimetric: No foreshortening is the same.
- Dimetric: Two foreshortenings are the same.
- Isometric: All foreshortenings are the same.
Axonometric
SLIDE 23
Parallel Projections
Trimetric
z y x
f f f ≠ ≠
Dimetric
z y
f f =
Isometric
z y x
f f f = =
Axonometric
SLIDE 24
Parallel Projections
Isometric Let there be 2 rotations a) about y-axis φ
b) about x-axis θ
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = 1 1 1 1 cos sin sin cos 1 1 cos sin 1 sin cos θ θ θ θ φ φ φ φ T
SLIDE 25
Parallel Projections
Isometric Let there be 2 rotations a) about y-axis φ
b) about x-axis θ
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = 1 sin cos sin cos sin sin cos θ φ φ θ θ φ φ T
SLIDE 26
Parallel Projections
[ ][ ]
⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ − = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 sin cos sin 1 cos 1 sin sin cos 1 sin cos sin cos sin sin cos 1 1 1 1 1 1 θ φ φ θ θ φ φ θ φ φ θ θ φ φ T U
Isometric
SLIDE 27
Parallel Projections sin cos sin cos sin sin cos
2 2 2 2 * 2 * 2 2 2 * 2 * 2 2 2 2 2 * 2 * 2
θ φ φ y x f θ y x f θ φ φ y x f
z z z y y y x x x
+ = + = = + = + = + =
Isometric
SLIDE 28
Parallel Projections
θ θ φ φ f f θ θ φ φ f f f f f f
z y y x z y x 2 2 2 2 2 2 2 2
cos sin cos sin cos sin sin cos = + ⇒ = = + ⇒ = = = =
Solving equations find θ, φ and f Isometric
SLIDE 29 Parallel Projections
Oblique
- Non-perpendicular projectors
to the plane of projection
- True shape and size for the
faces parallel to the projection plane is preserved
SLIDE 30
Parallel Projections
Oblique
SLIDE 31
Parallel Projections
Oblique
P(x,y,z) P’(x,y) P’’(xp,yp)
z y x
xp = x + L cos φ yp = y + L sin φ tan α =z/L or L = z cot α
L α φ
SLIDE 32
Parallel Projections
Oblique
P(x,y,z) P’(x,y) P’’(xp,yp)
z y
L α φ
When α =45o => Cavalier Lines perpendicular to the projection plane are not foreshortened When cot α = ½ => Cabinet Lines perpendicular to the projection plane are foreshortened by half φ is typically 300 or 450 x
SLIDE 33 Perspective Projections
- Parallel lines converge
- Non-uniform
foreshortening
perception, important for 3D viewing
A
Projectors Projection Plane Center of Projection
B B’ A’
SLIDE 34
Perspective Projections
SLIDE 35 Perspective Projections
Matrix Form
[ ] [ ]
[ ]
⎥ ⎦ ⎤ ⎢ ⎣ ⎡ + + + = + = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 1 1 1 1 1 1 1 1 1 1 1
* * *
rz z rz y rz x z y x rz z y x r z y x
SLIDE 36 Perspective Projections
Matrix Form Projection on z=0 plane
[ ][ ]
[ ]
⎥ ⎦ ⎤ ⎢ ⎣ ⎡ + + = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = = = 1 1 1 1 1 1 1 1 1 1 1
* * *
rz y rz x z y x r P P P T
z r rz
SLIDE 37 Perspective Projections
Geometrically
Z
P(x,y,z)
X Y
P*(x*,y*)
zc y l2 l1 y*
c c c
z z y y l l l z z z l l y l y − = ⇒ − = − − = 1 ,
* 1 2 2 1 2 2 *
SLIDE 38 Perspective Projections
Geometrically
Z
P(x,y,z)
X Y
P*(x*,y*)
zc l2 l1 x x* zc
c c c
z z x x z z x z x − = ⇒ − = 1
* *
When r = - 1/ zc this becomes same as obtained in matrix form
SLIDE 39
Perspective Projections
Vanishing Point Set of parallel lines not parallel to the projection plane converge to Vanishing Point
VPz Y Z X
SLIDE 40 Perspective Projections
Vanishing Point Point at infinity on +Z axis : (homogenous)
[ ]
1
[ ]
[ ] [ ]
[ ] [
]
1 1 1 1 1 1 1 1 1
* * * ' ' '
r z y x r r w z y x = = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ =
Recall r = -1/zc, the vanishing point is at -zc
SLIDE 41 Perspective Projections
Single Point Perspective
[ ] [ ]
[ ]
⎥ ⎦ ⎤ ⎢ ⎣ ⎡ + + + = + = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 1 1 1 1 1 1 1 1 1 1 1
* * *
px z px y px x z y x px z y x p z y x
COP on X-axis COP (-1/p 0 0 1) VPx (1/p 0 0 1)
SLIDE 42 Perspective Projections
Single Point Perspective
[ ] [ ]
[ ]
⎥ ⎦ ⎤ ⎢ ⎣ ⎡ + + + = + = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ 1 1 1 1 1 1 1 1 1 1 1
* * *
qy z qy y qy x z y x qy z y x q z y x
COP on Y-axis COP (0 -1/q 0 1) VPx (0 1/q 0 1)
SLIDE 43
Perspective Projections
Two Point Perspective
[ ][ ]
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = = 1 1 1 1 q p P P P
q p pq
SLIDE 44
Perspective Projections
Three Point Perspective
[ ][ ][
]
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = = 1 1 1 1 P P
q p
r q p P P
r pqr
SLIDE 45
Perspective Projections
SLIDE 46
Generation of Perspective Views
Additional transformation and then single point perspective transformation Simple Translation: Translation (l,m,n),COP=zc ,Projection plane z=0
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ + = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = rn m l r r n m l T 1 1 1 1 1 1 1 1 1 1
SLIDE 47
Generation of Perspective Views
X Y
Translation along y=x line:
SLIDE 48
Generation of Perspective Views
Translation in Z => Scaling
COP Projection plane
SLIDE 49 Generation of Perspective Views
Rotation
[ ][
]
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = = 1 1 1 1 cos sin 1 sin cos r φ φ φ φ P R T
rz y
Rotation about Y-axis by φ
SLIDE 50 Generation of Perspective Views
Rotation Rotation about Y-axis by φ
[ ][
]
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = = 1 cos sin 1 sin cos φ r φ φ r φ P R T
rz y
=> Two Point Perspective Transformation
SLIDE 51 Generation of Perspective Views
Rotation Two Rotations a) about Y-axis by φ b) about X-axis by θ [ ][
][ ]
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − = = 1 1 1 1 cos sin sin cos 1 1 cos sin 1 sin cos r θ θ θ θ φ φ φ φ P R R T
rz x y
SLIDE 52
Generation of Perspective Views
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − − = 1 cos cos sin cos sin sin cos cos sin sin sin cos θ φ r θ φ φ θ r θ θ φ r θ φ φ T
Two Rotations a) about Y-axis by φ b) about X-axis by θ Rotation => Three Point Perspective Transformation
SLIDE 53 Vanishing Points
Two ways
- Intersection of transformed lines
- Transformation of points at infinity
X Z Y Y X VPx VPz
SLIDE 54
Orthographic
Plane Geometric Projections
Parallel Perspective Axonometric Oblique Trimetric Dimetric Isometric Cavalier Cabinet Single Point Two Point Three Point
SLIDE 55 [ ] [ ] [ ]
T
M r p M r p c b a r M c b a z y x p ) ( ) (
1
− = − = + = =
−
Transformation from WCS to VCS
Conversion from one coordinate system to another Therefore a=(p-r).u, b=(p-r).v, c=(p-r).n
SLIDE 56 ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 ? ? ?
T wv
M A
In Homogenous Coordinates (a,b,c,1) = (x,y,z,1) Awv
Transformation from WCS to VCS
SLIDE 57 [ ]
translatio T T T
rM pM M r p c b a − = − = ) (
In Homogenous Coordinates r’= -rMT = (-r.u,-r.v,-r.n) = (rx’,ry’,rz’) puvn=pxyzAwv
⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ = 1 ' ' ' 1 ' ' '
z y x z z z y y y x x x z y x T wv
r r r n v u n v u n v u r r r M A
Transformation from WCS to VCS
SLIDE 58
Transformation from VCS to View Plane
e t=0 p* p t=1 t=t’ u n v e p (pu,pv,pn) p*(u*,v*)
Parametrically r(t) = e(1-t)+p.t
SLIDE 59 Transformation from VCS to View Plane
On u-v plane, r(t)n = 0
n n n v v n n n n u u n n n n n n
p e p e p e v p e p e p e u p e e t t p t e − − = − − = − = + − =
* * ' ' '
) ( ) 1 (
SLIDE 60 ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − =
−
1 1 1 1
1 n p
e M When eye is on n-axis eu=ev=0 u*=pu/(en-pn), v*=pv/(en-pn) Matrix form (n*=0) Perspective Transformation ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ −
−
1 1 1
1 n
e
Transformation from VCS to View Plane
SLIDE 61 Using Perspective Transformation Mp
Transformation from VCS to View Plane
) depth pseudo ( ) 1 , , , ( ) , , (
* * * * * * * n n n n n v n n u p n v u
p e p n p e p v p e p u M p p p n v u p − = − = − = = =
SLIDE 62 ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ − − =
− −
1 1 1 1
1 1 n v n u s
e e e e M
p*=(pu,pv,pn,1)MsMp q : in WCS maps to p*=qAwvMsMp
Transformation from VCS to View Plane
If eye is off n-axis we have another matrix