Sunteți pe pagina 1din 8

3 Dimentional Rotation

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 tht! desired rotation with the following transformation
sequence.

1. Translate the object so that the rotation axis coincides


with the parallel coor-dinate axis.

2. Perform the specified rotation about that axls.

3. Translate the obiect so that the rotation axis is moved


back to its original po-sition.
When a n object is to be rotated about an axis that i s not parallel
to one of the coordinate axes, we need to perform some additional
transformations as follows :

1 Translate the object so that the rotation axis pass through the coordinate
orlgin.

2. Rotate the object so that the axis of rotation ccincides with one of the coor-
dinate axes.

3. Perform thc specified rotation about that coordinate axis.

4. Apply inverse rotations bring the rotation axls back to its original
orien-tostation.

5. Apply the inverse translation to bring the rotahon axis back to its original
position.
Rotation Along an Arbitrary Axis
1. Transform the axis to cross origin (0,0,0)
2. Transform the axis around X onto the XZ
plane
3. Transform the axis around Y onto the Z
axis
4. Perform Rotation (angle=)
5. Inverse Transform of 3.
6. Inverse Transform of 2.
7. Inverse Transform of 1.
Step 1: Translate to (0, 0, 0)

[ ]
1 0 0 0
y T 1= 0 1 0 0
0 0 1 0
Rotating axis Tx Ty Tz 1

[ ]
x 1 0 0 0
T 1 = 0 1 0 0
1
z 0 0 1 0
Tx Ty Tz 1

For easier viewing, I use RHS.


Step 2: Rotate around X, project to
XZ y y

(a, b, c)
b2 +c 2
b
z
c x
x
(into the screen)

[ ] [ ]
1 0 0 0 1 0 0 0
0 cos sin 0
T 2= 0 cos sin 0 T2 =
1
0 sin cos 0 0 sin cos 0
0 0 0 1 0 0 0 1

c b c b
cos = and sin = cos = and sin =
b2 +c2 b 2 +c 2 b2 +c2 b 2 +c 2
Lets pick up a random point (a, b, c) on the
axis to figure out cos
Step 3: Transform around Y onto the Z
axis
y a
y x
(into the screen)
x a2 +b 2 +c 2
(a, 0, c)
z z

[ ] [ ]
cos 0 sin 0 cos 0 sin 0
0 1 0 0 0 1 0 0
T 3= T 1
3 =
sin 0 cos 0 sin 0 cos 0
0 0 0 1 0 0 0 1

cos =
b 2 +c 2
and sin =
a b 2 +c 2
cos = 2 2 2 and sin =
a
a 2 +b 2 +c 2 a 2 +b 2 +c 2 a +b +c a 2 +b 2 +c 2
Step 4: Perform Rotation (angle=) on
Z

[ ]
cos sin 0 0
sin cos 0 0
T 4=
0 0 1 0
0 0 0 1
Combine all matrices with Step 5,
6, 7

[ x', y ', z ',1 ]=[ x,y,z, 1 ]T 1T 2T 3T 4T 3 T 2 T 1


1 1 1

S-ar putea să vă placă și