0% found this document useful (0 votes)
21 views5 pages

3D Rotation Transformations Explained

The document discusses three-dimensional transformations, focusing on basic transformations such as translation and rotation. It details the mathematical representations for translating points and rotating objects around the x, y, and z axes using homogeneous coordinates. Additionally, it outlines the process for general rotations about arbitrary axes, involving a sequence of translations and rotations to achieve the desired orientation.

Uploaded by

Mahalakshmi B
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views5 pages

3D Rotation Transformations Explained

The document discusses three-dimensional transformations, focusing on basic transformations such as translation and rotation. It details the mathematical representations for translating points and rotating objects around the x, y, and z axes using homogeneous coordinates. Additionally, it outlines the process for general rotations about arbitrary axes, involving a sequence of translations and rotations to achieve the desired orientation.

Uploaded by

Mahalakshmi B
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

43 THREE DIMENSIONAL TRANSFORMATIONS

43.1 BASIC TRANSFORMATION


Geometric transformations and object modeling in three dimensions are extended from
two-dimensional methods by inchuding considerations for the z-coordinate.
Translation
In a three dimensional homogeneous coordinate representation, a point or an object is
translated from position P= (x, y, z) to position P' = (x,y',z') with the matrix operation.
|1 0 0 t, X

y' 0 1 0 t,
z' 001 t, N ’(1)
0 0 0 1

(or) P' =TP


Parameters ty, ty and t, specifying translation distances for the coordinate directions x,
yand z are assigned any real values. (Figure 4.6).
Ihe matrix representation in equation (L)in equivalent to the three equations.
x'= X+t y'= y+t, z'= z+t,
4.8 Computer Graphics

y axis

(xya)
Z axis
Xaxis

Figure 4.6 Translation ofa point.


Inverse of the translation matrix in equation () can be obtained by
translation distäinces ty, ty and tz negating the
This produces a translation in the opposite direction and the product of a translti
matrix and its inverse produces the identity matrix.
Rotation
" To generate a rotation transformation for an object an axis of rotation must be
designed to rotate the object and the amount of angular rotation is also be specifed,
Positive rotation angles produce counter clockwise rotations about acoordinate axis
Co-ordinate Axes Rotations
The 2D z axis rotation equations are easily extended to 3D.
x'= xcos0-ysin 0

y'= xsin +ycos0 ’(2)


z' = Z

Parameters@specifes the rotation angle. In homogeneous coordinate forn, the 3D z


axis rotation equations are expressed as
cos -sin 9 0 0|x|
y sin cos 0 0y
0 0 ’(3)
0
which we can write more compactly as

P'= R,(0).P ’(4)


Three Dimensional Tramsforrnations
Figure 4.7 illustrates rotation of an object
about the z axis.

7
Figure 4.7 Rotation of anobject about zaxis.
Transformation equations for rotation about the other two coordinate axes can be
obtained with acyclic permutation of the coordinate parameters x, yand zin equation (2)ie.
we use the replacements.
X’ y ’ z ’ x ’(5)
Substituting permutations (5) in Equation (2), we get the equations for an x-axis rotation:
y'= ycos -zsin)
z' = ysin + zcos 0 ’ (6)
x'= X
which can be written in the homogeneous coordinate form
0 0 0x
0 cos 0 -sin 0
y'
z' 0 sin cos
’ ()

00 1

(or) P' = R,(0).P ’ (8)

Rotation of an object around the x-axis is demonstrated in Figure 4.8.


4.10 Computer Graplhics

Rotation of anobjectabouty axls.


Flgure 4.8
equation (6) give the transformation
Cyclically
y axis rotation.
permuting coordinates in equation for
z' = zcos-x sin0
x' =zsin +x cos0} ’(9)
y' = y
for y-axis rotation is
The matrix representation
0x
x' cos 0 sin
y' 01 0 y

Z' -sin 0 cos 0 ’ (10)


0 0 0 1|1

(or) P' R,(0).P


shown in Figure 4.9.
An example of yaxis rotation is

Figure 4,9 Rotation of an object about x axis.


rotation angle by -d.
An ínverse rotation matrix is formed by replacing the direction,s9
in a clockwise
Negative values for rotation angles generate rotations multiplied by its h
the identity matrix is produced when any rotation matrix is
Three Dimensional Transformations
4.11
Since only the sine function is affected by the change in sign of the
the inverse matrix can also be obtained by interchanging rows and rotation angle,
we can calculate the inverse of any rotation matrix R by
columns. (i.c.)
evaluating its transpose
(R= R).
General Three Dimensional Rotations
A rotation matrix for any axis that does not coincide with a coordinate axis can be
set up as a composite transformation involving combinations of translations and the
coordinate axes rotations.
" We obtain the required composite matrix by
(1) Setting up the transformation sequence that moves the selected rotation axis
onto one of the coordinate axes.
(2) Then set up the rotation matrix about that coordinate axis for the specified
rotation angle.
(3) Obtaining the inverse transformation sequence that returns the rotation axis to
its original position.
In the special case where an object is to be rotated about an axis that is parallel to
one of the coordinate axes, we can attain the desired rotation with the following
transformation sequence:
(1) Translate the object so that the rotation axis coincides with the parallel coordinate
axis.

(2) Perform the specified rotation about that axis.


original position.
(3) Translate the object so that the rotation axis is moved back to its
parallel to one of the
When an object is to be rotated about an axis that is not
transformations.
coordinate axes, we need to perform some additional
such case, we need rotations to align the axis with a selected c0ordinate axis and
In
to bring the axis back to its original orientation.
we can accomplish
Given the specifications for the rotation axis and the rotation angle,
the required rotation in five steps:
passes through the coordinate origin.
(1) Translate the object so that the rotation axis
coincides with one of the coordinate
(2) Rotate the object so that the axis of rotation
axes.

(3) Perform the specified rotation about that coordinate axis.


back to its original orientation.
(4) Apply inverse rotations to bring the rotation axis
back to its original
(5) Apply the inverse translation to bring the rotation axis
position.

You might also like