Professional Documents
Culture Documents
L6 3dtranslation
L6 3dtranslation
L6 3dtranslation
LECTURE 6
3D TRANSFORMATIONS
1. Linear 3D Transformations:
Translation, Rotation, Scaling
Shearing, Reflection
2. Perspective Transformations
Transformations in 3 dimensions
Geometric transformations are mappings from
one coordinate system onto itself.
The geometric model undergoes change
relative to its MCS (Model Coordinate
System)
The Transformations are applied to an object
represented by point sets.
Rigid Body Motion: The relative distances
between object particles remain constant
Affine and Non-Affine maps
Transformed point set X* = f(P, transformation
parameters)
y
x
[T ] =
b
c
e
f
i
j
q
r
L
Sc ocal
ali
ng
Perspective transformations
Linear transformations local scaling, shear,
rotation / reflection
Translations l, m, n along x, y, and z axis
Overall scaling
3D Scaling
a 0 0 0
[Ts ] =
0 e 0 0
0 0 j 0
0 0 0 1
0 2 2 0 0 2 2 0
[ X ] = [Ts ]
0 0 3 3 0 0 3 3
1 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1
Overall Scaling
1 0 0 0
0 1 0 0
[Ts ] =
0 0 1 0
[Ts ][X ] = [x'
= [x' / s
y' / s
0 0 0 s
T
y' z ' s]
If S<1
Enlargement of
volume
S>1 Reduction
in volume
z ' / s 1]
0 2 2 0 0 2 2 0
[ X ] =
0 0 2 2 0 0 2 2
2 2 2 2 0 0 0 0
1 1 1 1 1 1 1 1
3D SHEARING 1
g 0 x
b
c
1
f
i 0 y
1 0 z
0 1 1
[TSH ] =
[Ts ][X ] = [x + yd + gz bx + y + iz cx + fy + z 1]
0
1
0.25 0.75
0 0.85 0.15
1
0 0.25 0.95 0.7
1
1
1
1
[TRz ] =
cos
sin
0 0
sin
0
cos
0
0 0
1 0
0 1
Det[T]=+1
The position vector is assumed to be a row vector in right handed system
1
[TRx ] =
0 cos sin 0
0 sin cos 0
0
[TRy ] =
cos
0 sin
0
sin
1
0
0
cos
0
0
0 0 2 2 0 0 2 2
1 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1
[TRx ] =
[ X ] =
0 3
1 1
3
1
0 0
1 0
0 1 0 0
0
0 1
0
1
0 3
0 0
3
0
0
0
0 0 2 2 0 0 2 2
1 1 1
1 1 1 1
1
0 0 2 2 0 0 2 2
1 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1
[TRy ] =
0 1 0
1 0 0
1 0 0 0
0
[ X ] =
1
0
1
0
1
2
0 0 1
1 0
2 0
0
0
0
2
0
2
0 3 3 0 0 3 3 0
1 1 1 1 1 1 1 1
0 0 1 0
0 0
1 0 0
0 1 0
0 0 1
and
[Txz ] =
0 0
0 1 0 0
0
1 0
0 1
1
0
2
0
2
1
1
1
2
0
2
1
1
1
1 1 1 1 2 2 2 2
1 1 1 1 1
1
1
1
[Txy ] =
1 0
0 1
0 0 1 0
0 0
[X ] =
1
0
1 2 2 1 1 2 2 1
0 0 1 1 0 0 1 1
1 1 1 1 2 2 2 2
1 1 1 1 1 1 1 1
COMBINATION OF TRANSFORMATIONS As in
2D, we can perform a sequence of 3D linear
transformations.
This is achieved by concatenation of
transformation matrices to obtain a combined
transformation matrix
A combined matrix [T ][ X ] = [ X ][T1 ][T2 ][T3 ][T4 ] [Tn ]
Where [Ti] are any combination of
Translation
Scaling
Shearing
linear trans. but not perspective
Rotation
transformation
Reflection
(Results in loss of info)
cos
0 1 0 1
0 cos
sin
0 0 1 1
0 sin
cos
sin
0 0 0
0 sin
0 cos
0.354 0.612
1.673
0.5
0.366
0.707
[T ][ X ] =
0
0
0.866
0
1.768
=
0.866
1.061
1
1 0 0
1 2 2 1 1 2 2 1
0 1 0 m
0 cos
sin
0 1 0 m
1 1 2 2 1 1 2 2
n
1
0 sin
0
0
cos
0
0
1
0 0 1
0 0 0
2 2 2 2 2 1 1 1
1 1 1 1 1 1 1 1
0 0 1
0 0 0
n
1
1
[T ] =
1 2 2 1 1 2 2 1
1 1 1 1 1 1 1 1
1
2
2
1
1
2
2
1
0.817 0.817 1.683 1.683 1.317 1.317 2.183 2.183
1.683 1.683 2.183 2.183 0.817 0.817 1.317 1.317
1
1
1
1
1
1
1
1
Z
cy
cz
cx
cx
d = c y2 + c z2
cos =
cz
d
sin =
cy
d
cos = d
sin = c x
10
0
1
0
0
0
1
x0
y0
z0
[Tr ] =
[Tr ]
0
0
0 [ R ] =
1
0
0
1
0
0
1
0
0
x0
y0
z0
cos
sin
0 sin
cos
1
[ R ]
[ R ] =
0 cos( ) sin( ) 0
0 sin( ) cos( ) 0
0
0
0
1
cos( )
0
sin( )
0
[ R ]
0 sin( )
1
0
0 cos( )
0
0
cos
0
0
0
0
1
0 sin
1
0
0
0
sin
cos
cos
sin
cos
cy / d
0 sin
cz / d
cos( ) 0 sin( ) 0
[ R ] =
sin( )
cos( )
0 c y / d
0 cx
c x
cz / d
[ R] =
cos
sin
0 0
sin
cos
0 0
1 0
0 1
11
( x0 , y0 , z0 )
[V ] = ( x1 x0 ) ( y1 y0 ) ( z1 z 0 )
[c x
cy
cz ] =
( x1 x0 ) ( y1 y0 ) ( z1 z 0 )
( x1 x0 ) 2 + ( y1 y0 ) 2 + ( z1 z 0 ) 2
| n | = 12 12 12
[c x
cy
]1 / 2
cz ] =
1 1 1
3
12