Professional Documents
Culture Documents
Three Dimensional Modeling Transformations: Dr. S.M. Malaek
Three Dimensional Modeling Transformations: Dr. S.M. Malaek
Modeling
Transformations
Dr. S.M. Malaek
Assistant: M. Younesi
3D Point
x
y
z
A 3D point P is represented in
homogeneous coordinates by a 4-dim. Vect:
x
y
z
1
x
y
z
1
3D Coordinate Systems
Left Hand coordinate
Right Hand
coordinate system:
system:
3D Transformation
In homogeneous coordinates, 3D
transformations are represented by 44
matrixes:
a b
d e
g h
0 0
c
f
i
0
1
x
3D Translation
3D Translation
1 0 0 tx
0 1 0 t y
0 0 1 tz
0 0 0 1
P T P
x
y
z
1
3D Translation
3D Translation
x, y , z
T t x , t y , t z
Inverse Translation:
T (t , t , t ) T ( t ,t ,t )
1
3D Rotation
3D Rotation
3D Rotation
Coordinate Axis
Rotations
sin
cos
0
0
0 0 x
0 0 y
1 0 z
0 1 1
P R z () P
x yzx
X-axis rotation:
0
0
x' 1
y ' 0 cos sin
z ' 0 sin cos
0
0
1 0
0
0
x
y
z
1 1
P R () P
x
Y-axis rotation:
1
0
0
0
1
P R () P
y
x
y
z
1
Rotations
P T
R x () T P
R () T 1 R x 1 ( ) R y1 ( ) R z () R y ( ) R x ( ) T
1
1
1
R
(
R
(
R
(
R
(
R
(
R
(
T
x
y
z
y
x
A rotation matrix for any axis that does not coincide with a coordinate
axis can be set up as a composite transformation involving
combination of translations and the coordinate-axes rotations:
1.
2.
3.
4.
5.
Translate the object so that the rotation axis passes through the coordinate origin
Rotate the object so that the axis rotation coincides with one of the coordinate
axes
Perform the specified rotation about that coordinate axis
Apply inverse rotation axis back to its original orientation
Apply the inverse translation to bring the rotation axis back to its original position
Roll
Roll: rotation around the front-to-back
axis.
PITCH
PITCH: Rotation around the side-to-side
axis
YAW
YAW: Rotation around the vertical axis.
An Example of the
Airplane
y DOF
R
y DOF
DOF ( y DOF )
DOF ( y DOF )
DOF
DOF
3D Scaling
3D Scaling
About origin: Changes the size of the object and
repositions the object relative to the coordinate origin.
x
sx
y
0
z
0
1
0
sy
sz
0
0
0
1
P S P
x
y
z
3D Scaling
About any fixed point:
sx
0
sy
sz
T ( x f , y f , z f ) S ( s x , s y , s z ) T( x f , y f , z f )
(1 s x ) x f
(1 s y ) y f
(1 s z ) z f
1
Composite
3D Transformations
Composite 3D Transformations
Same way as in two dimensions:
Multiply matrices
3D Reflections
3D Reflections
3D Reflections
About a plane:
1 0
0 1
0
0 0
0 0 1 0
0
0
0
1
x
y
3D Shearing
3D Shearing
3D Shearing
M zshear
1 0 shzx
0 1 sh
zy
0 0
0 0
1
0
shzx z ref
shzy z ref
Transformations
Between
Coordinate Systems
y'
uy '
( x0 , y0 , z0 )
(0,0,0)
x'
uz '
z'
u ' x1
u'
R T y1
u ' z1
ux '
u'x 2
u'x3
u' y 2
u'z 2
u' y3
u'z 3
0
T x0 , y0 , z0
0