Professional Documents
Culture Documents
04 Transformation
04 Transformation
Transformations
What is a transformation?
Transformation :
2D Transformations
Homogeneous Coordinates and Matrix
Representation of 2D Transformations
Matrix Representation of 3D Transformations
Transformations as a Change in Coordinate
System
2D Translations.
Point P defined as P ( x, y ),
translate to Point P( x, y) a distance d x parallel to x axis, d y parallel to y axis.
x x d x y y d y
Define the column vectors
x
P , P
y
Now
P P T
x
dx
,T
y
dy
P
P
y s y . y
P
P
0
s y
Now
P S P or
x s x
y 0
0
s y
x
y
P(x,y)
P(x,y)
r
x
P(x,y)
x r. cos
y r. sin
r
x
x r. cos
y r. sin
Given us:
x x. cos y. sin
y x. sin y. cos
x cos
y sin
sin
cos
x
y
cos
Define the matrix R
sin
sin
, P R P
cos
Transformations.
Translation.
P=T + P
Scale
P=S P
Rotation
P=R P
We would like all transformations to be
multiplications so we can concatenate them
express points in homogenous coordinates .
Homogeneous coordinates
Homogeneous coordinates
W=1 plane
X
Y
Translations in homogenised
coordinates
x 1 0 d x x
y 0 1 d . y
y
1 0 0 1 1
x x d x
y y d y
11
Concatenation.
P P T (d x1 , d y1 )
P P T (d x 2 , d y 2 )
P P T (d x1 , d y1 ) T (d x 2 , d y 2 ) P T (d x1 d x 2 , d y1 d y 2 )
So we expect :
T (d x1 , d y1 ) T (d x 2 , d y 2 ) T (d x1 d x 2 , d y1 d y 2 )
Concatenation.
The matrix product T (d x1 , d y1 ) T (d x 2 , d y 2 ) is :
1 0 d x1
0 1 d
y1
0 0 1
1 0 d x 2 1 0 d x1 d x 2
. 0 1 d 0 1 d d
y2
y1
y2
0 0 1 0 0
sx
S (sx , s y )
0
s y
In homogeneous coordinates :
sx
S ( s x , s y ) 0
0
0
sy
0
0
0
1
Concatenation of scales.
The matrix product S ( s x1 , s y1 ) S ( s x 2 , s y 2 ) is :
0
0
s x1 0 0 s x2 0 0 s x1 s x2
0 s
0
.
0
s
0
0
s
s
0
y1
y2
y1
y2
0 0 1 0
0 1 0
0
1
Only diagonal elements in the matrix - easy to multiply !
sin
cos
0
0
0
1
y
1
R 1 ( ) R T ( )
3D Transformations.
x
z (out of page)
Note:
Convenient to think of display
as
Being left-handed !!
( z into the screen )
Translation in 3D.
Simple extension to the 3D case:
1
0
T (d x , d y , d z )
0
0
1
0
0
0 dx
0 d y
1 dz
0 1
Scale in 3D.
Simple extension to the 3D case:
sx
0
S (s x , s y , s z )
0
0
sy
0
0
0
0
sz
0
0
0
0
Rotation in 3D
sin
cos
0
0
0
0
1
0
0
0
0
Rotation in 3D
0
1
0 cos
R x ( )
0 sin
0
0
0
sin
cos
0
0
,
0
cos
0
R y ( )
sin
0 sin
1
0
0 cos
0
0
Transformations of coordinate
systems.
Define P (i ) as a point in coordinate system i
Define M i j as the transform that converts a point in system j to a point in system i
P (i ) M i j P ( j )
and
P ( j ) M j k P ( k )
we obtain by substitution :
M i k M i j M j k
It can also be shown that :
M j i M i1 j
M R L M LR
1
0
0 0
1 0
0 1
0 0
0
0
0
Projections
Perspective Projection
Parallel Projection
Planar Geometric
Projections
Perspective Projection
Parallel Projection
Taxonomy of Planar
Geometric Projections
planar geometric projections
parallel
perspective
1 point
multiview axonometric oblique
orthographic
isometric
dimetric
trimetric
2 point
3 point
Orthographic Projection
Projectors are orthogonal to projection
plane
Multiview Orthographic
Projection
front
side
Oblique Projection
Arbitrary relationship between projectors
and projection plane
Perspective Projection
Projectors coverge at center of projection
Vanishing Points
Parallel lines (not parallel to the projection
plan) on the object converge at a single
point in the projection (the vanishing point)
Drawing simple perspectives by hand uses
these vanishing point(s)
vanishing point
One-Point Perspective
One principal face parallel to projection
plane
One vanishing point for cube
Two-Point Perspective
On principal direction parallel to projection
plane
Two vanishing points for cube
END
Thank you for your attentions