Cynthia Vaskis
SLM521 Spring 2004
Dropin #2 Assignment
File: matrotP1.htm
Lesson Title: Math
Calculations to Rotate an Object in 3D Space – Rotation matrix about the Y axis
The previous exercise in
rotating the object’s Point vectors about the X axis by +/-180 degrees produced
the new vectors Point 1 = (1, -1, -1), new Point 2 = (2, -2, -2), and new Point
3 = (1, -1, -2).
To rotate an object about
its Y axis the amount of angle beta, notice that the one (1) in the second row
and second column indicates that the rotation does not change the Y values in
the object’s definition. The positive rotation
direction is clockwise as you look down the coordinate axis vector that you are
going to rotate around toward the origin of the coordinate system.
cos(beta)
0 -sin(beta) 0 1 0 sin(beta)
0 cos(beta) Ry(beta) =
![]()
![]()
To rotate an object about
just one of its axes at a time is done by multiplying the associated rotational
matrix with each of the object’s definition vectors to obtain new definition
vectors that are in the rotated position.
The rotational matrices use
the trigonometry functions of sine and cosine of the rotational angle. To understand how we calculate values for the
sine and cosine we must look at the unit circle with the sine and cosine values
for several angles around the circle. Of
course, you could use any angle amount between -180 degrees and + 180 degrees
but the value would have to be looked up in a trigonometry table. For simplicity, the examples use angles that
produce well know whole number (integer) sine and cosine values such as -1, 0
and +1.

To multiply a matrix times a
vector you first write the matrix down and then write the vector in a vertical
position to the right of the matrix.
For our example we will use
the angle beta = +90 degrees, Thus, the cosine of +90 = 0 and the sine +90
degrees = 1.
The rotational matrix for a
rotation about the Y axis of +90 degrees is below. Use the new Point vectors mentioned above.
Look here for basic matrix multiplication operations.
The rotational matrix for a +90
degree rotation about the Y axis is below.
Use it to rotate the object’s Points (or vectors) about the Y axis by
+90 degrees. If you want to continue the
overall X, Y, Z full rotation then use the resulting Point vectors from the X
rotations above instead of the original vectors.
(0*1) + (0*(-1))
+ (-1)*(-1) (0*1) + (1*(-1))
+ (0*(-1)) (1*1) + (0*(-1))
+ (0*(-1)) 1 -1 1 =

![]()
![]()

![]()
Exercise:
Finish the rotations by multiplying
the Y axis rotational matrix above with the second and third Point vectors from
the X axis rotations (listed at the top of this page).
Use the graph paper to draw the new Points vectors to find out
where the triangle has moved.
The latest Point 1 = (1, -1,
1). Find the new Point 2 and Point 3
vectors after the Y axis rotation.
Remember the resulting vectors so that you can use them in the Yaw
rotations in the next exercise on the top lesson page.
Hint
– Points after Y axis rotation using the Point vectors from the X axis
rotations mentioned above.