 Translation<br>
2) Scaling<br>
3) Rotation about the x-axis<br>
4) Rotation about the y-axis<br>
5) Rotation about the z-axis<p>
Our goal in the short term is to combine these three rotations to obtain a rotation about an arbitrary axis in space.<p>
(1) Translation <p>
Xt = X + Tx<br>
Yt = Y + Ty<br>
Zt = Z + Tz<p>
<pre>
[Xt Yt Zt 1] = [X Y Z 1] 1 0 0 0
0 1 0 0
0 0 1 0
Tx Ty Tz 1
</pre><p>
(2) Scaling <p>
Xs = X * Sx<br>
Ys = Y * Sy<br>
Zs = Z * Sz<p>
<pre>
[Xs Ys Zs 1] = [X Y Z 1] Sx 0 0 0
0 Sy 0 0
0 0 Sz 0
0 0 0 1
</pre><p>
Remember, scaling is still relative to some reference point.<p>
Rotation - we have rotation about the x,y, and z-axis. Each of these rotations is independent of one another and in a cw or ccw direction.<p>
(3) Rotation about the x-axis: In general, we will consider rotating a point cw by the angle theta about the x-axis in a lhs.<p>
Visually, how will the point be moved? From the positive y-axis to the positive z-axis.<p>
Xrx = X<br>
Yrx = Ycos(theta) - Zsin(theta)<br>
Zrx = Ysin(theta) + Zcos(theta)<p>
<pre>
[Xrx Yrx Zrx 1] = [X Y Z 1] 1 0 0 0
0 cos(theta) sin(theta) 0
0 -sin(theta) cos(theta) 0
0 0 0 1
</pre><p>
Problem: Rotate the unit vector [0 0 -1 1] by 90 degrees (cw) about the x-axis in a lhs given cos(90)=0 and sin(90)=1. Answer each of the following:<p>
1) Why is the vector [0 0 -1 1] a unit vector?<br>
2) Show the initial matrix setup for the rotation.<br>
3) What is the resulting point produced from the operation.<br>
4) Draw the situation before and after the rotation on a lhs.<br>
5) What is the rotation matrix for a ccw rotation about the x-axis.<p>
(4) Rotation about the y-axis: In general, we will consider rotating a point cw by the angle theta about the y-axis in a lhs.<p>
Xry = Xcos(theta) + Zsin(theta)<br>
Yry = Y<br>
Zry = -Xsin(theta) + Zcos(theta)<p>
<pre>
[Xry Yry Zry 1] = [X Y Z 1] cos(theta) 0 -sin(theta) 0
0 1 0 0
sin(theta) 0 cos(theta) 0
0 0 0 1
</pre><p>
Problem: Rotate a unit vector [1 0 0 1] by 90 degrees cw about the y-axis in a lhs given cos(90)=0 and sin(90)=1. Show the initial matrix setup, the final point, and the resulting picture.<p>
(5) Rotation about the z-axis: In general, we will consider rotating a point cw by the angle theta about the z-axis in a lhs.<p>
Xrz = Xcos(theta) - Ysin(theta)<br>
Yrz = XSin(theta) + Ycos(theta)<br>
Zrz = Z<p>
<pre>
[Xrz Yrz Zrz 1] = [X Y Z 1] cos(theta) sin(theta) 0 0
-sin(theta) cos(theta) 0 0
0 0 1 0
0 0 0 1
</pre>
Some points of interest:<br>
1) These matrices can be change to provide for a ccw rotation by simply swapping the signs of sin(theta) in the rotation matrix.<br>
2) If we specify that the sense of rotation is looking from the negative axis to the origin, the meaning of cw and ccw changess.<br>
3) If we were to use the previous transformations in a rhs, this would also reverse the meaning of cw and ccw.<p>
A general rule for rotations in space: We define the three basic rotations in an unambiguous way. A rotation of 90 degrees brings one positive axis into another without ever crossing the negative axis during rotation.<p>
<img src=)
A rotation from one positive axis the another positive axis always has the form:
cos(theta) sin(theta)
-sin(theta) cos(theta)
That lead us to each of the following rotation matrices:
Rotate x+ -> y+ Rotate y+ -> z+ Rotate x+ -> z+ about z about x about y cos sin 0 0 1 0 0 0 cos 0 sin 0 -sin cos 0 0 0 cos sin 0 0 1 0 0 0 0 1 0 0 -sin cos 0 -sin 0 cos 0 0 0 0 1 0 0 0 1 0 0 0 1For Tuesday (11/7/95) Read up on Rotation about an arbitrary line on pp. 171-174.