You are on page 1of 7

3D Transformations

Basic transformations:
Translation
Rotation
Scaling
Translation:
In a three-dimensional homogeneous coordinate representation, a point is translated from
position P = (x, y, z) to position P' = (x', y', '! "ith the matri# operation
Rotation:
To generate a rotation transformation for an o$%ect, "e must designate an a#is of rotation
&a$out "hich the o$%ect is to $e rotated! and the amount of angular rotation'
Rotation around the coordinate axes:
The t"o-dimensional -a#is rotation e(uations are easil) e#tended to three dimensions:

* * + + +
* + +
+ * +
+ + *
*
z
y
x
t
t
t
z
y
x
z
y
x
P T P =
Parameter , specifies the rotation angle' In homogeneous coordinate form, the three-
dimensional z-axis rotation e(uations are e#pressed as
x-axis rotation:
-
Y-axis rotation:


=
* + + +
+ * + +
+ + cos sin
+ + sin cos
! &

z
R
P R P = ! &
z
Rotation Arround a Parallel Axis:
Rotating the o$%ect around a line parallel to one of the a#es: Translate to a#is, rotate, translate
$ac.'
*' Translate the o$%ect so that the rotation a#is coincides "ith the parallel coordinate a#is'
/' Perform the specified rotation a$out that a#is
3. Translate the o$%ect so that the rotation a#is is mo0ed $ac. to its original position'
1hen an o$%ect is to $e rotated a$out an a#is that is not parallel to one of the coordinate a#es, "e
need to perform some additional transformations' 2i0en the specifications for the rotation a#is
and the rotation angle, "e can accomplish the re(uired rotation in fi0e steps
* Translate the o$%ect so that the rotation a#is pass= through the coordinate origin'
. Rotate the o$%ect so that the a#is of rotation coincides "ith one of the coordinate
a#es'
3' perform the specified rotation a$out that coordinate a#is'
4' 5ppl) in0erse rotations to $ring the rotation a#is $ac. to original orientation'
6' 5ppl) the in0erse translation to $ring the rotation a#is $ac. to its original position'
5 unit 0ector u is then defined along the rotation a#is as
7irst step: Translate P
*
to origin
! , , & c b a = =
!
!
u

=
* + + +
* + +
+ * +
+ + *
*
*
*
z
y
x
T
8e#t step: 5lign u "ith the z a#is
"e need t"o rotations: rotate around x a#is to get u onto the xz plane, rotate around y a#is to get
u aligned "ith z a#is'
5lign u "ith the z a#is
*! rotate around x a#is to get u into the xz plane,
/! rotate around y a#is to get u aligned "ith the z a#is
rotate around y a#is to get u aligned "ith the z a#is
The transformation matri# for rotation a$out an ar$itrar) a#is then can $e e#pressed as the
composition of these se0en indi0idual transformations:
"#A$%&'
The matri# e#pression tor the scaling transformation of a position P = (x, ), z) relati0e to the
coordinate origin can $e "ritten as

=
* + + +
+ +
+ +
+ + + *
! &
d
c
d
b
d
b
d
c
x
R
Scaling "ith respect to a selected fi#ed position (xf, )f, f,) can $e represented "ith the
follo"ing transformation se(uence:
*' Translate the fi#ed point to the origin'
/' Scale the o$%ect relati0e to the coordinate origin
3' Translate the fi#ed point $ac. to its original position'
The matri# representation for an ar$itrar) fi#ed-point scaling can then $e e#pressed as the
concatenation of these translate-scale-translate transformations as
Reflections:
A three-dimensional retlection can $e performed relati0e to a selected reflection axis or "ith
respect to a selected reflection plane.
The matri# representation for this reflection of points relati0e to the xy plane is
Shear:
Shearing transformations can he used to modif) oh%r0t shapes' The) are also useful in three-
dimensional 0ie"ing for o$taining general pro%ection transformations' The matri# representation
for this shearing in 9a#is is

You might also like