3D Transformation
3D Transformation
Geometric
Transformations
3D Point
We will consider points as column vectors.
Thus, a typical point with coordinates (x, y, z)
is represented as:
x
y
z
3D Point Homogenous Coordinate
A 3D point P is represented in homogeneous
coordinates by a 4-dim. Vector:
x
y
P
z
1
3D Point Homogenous Coordinate
d e f t
y
g h i t
z
0 0 0 1
3D Translation
3D Translation
P is translated to P' by: x 1 0 0 t x x
y 0 1 0 t y
P T P y
z 0 0 1 t z z
1 0 0 0 1 1
x x t x
y y t y
z z t z
3D Translation
An object is translated in 3D dimensional by
transforming each of the defining points of the
objects .
3D Translation
An Object represented as a set of polygon surfaces,
is translated by translate each vertex of each surface
and redraw the polygon facets in the new position.
P R z ( ) P
Coordinate Axis Rotations
Obtain rotations around other axes through
cyclic permutation of coordinate parameters:
x yzx
Coordinate Axis Rotations
X-axis rotation:
x ' 1 0 0 0 x
y ' 0 cos sin 0 y
z ' 0 sin cos 0 z
1 0 0 0 1 1
P R () P
x
Coordinate Axis Rotations
Y-axis rotation: x' cos 0 sin 0 x
y ' 0 1 0 0 y
z ' sin 0 cos 0 z
1 0 0 0 1 1
P R () P
y
General Three Dimensional
Rotations
General Three Dimensional Rotations
Rotation axis parallel with coordinate axis (Example x axis):
P T 1
R x (θ) T P
General Three Dimensional Rotations
An arbitrary axis (with the rotation axis projected onto the Z
axis):
y y y
P2 P2
P1 P1
P1
x x P2 x
z z z
y y y
P2 P2
P1 P1 P1
P2 x x x
z z z
x s x 0 0 0 x
y 0 sy 0 0 y
z 0 0 sz 0 z
1 0 0 0 1 1
x x S x
P S P y y S y
z x S z
y y
z x z x
3D Scaling
About any fixed point:
T( x f , y f , z f ) S ( s x , s y , s z ) T( x f , y f , z f )
sx 0 0 (1 s x ) x f
0 s 0 (1 s y ) y f
y
0 0 s z (1 s z ) z f
0 0 0 1
Composite
3D Transformations
Composite 3D Transformations
z z'