View Full Version : transformation matrix
UrbanXrisis
Jul30-06, 12:19 PM
Find the transformation matrix that rotates the axis x_3 of a rectangular coordinate system 45 degrees toward x_1 around the x_2 axis.
I have a question about what exactly are the x_1,x_2,x_3 supposed to be. Do I assume that they are the x,y,z axis?
Also, what is the general form of a two-dimensional transformation matrix? I know that there are different ones for rotation, scaling, shearing, and so on. But is there a general form for a 2x2 transformation matrix?
0rthodontist
Jul30-06, 01:07 PM
Yes, they are the x, y, z axes. The x1 x2 x3 just refer to three coordinates in your vectors. The x2 axis is all points of the form (0, x2, 0).
The "general form" of a 2x2 matrix is just any 2x2 matrix. Every matrix can be seen as a "transformation matrix."
UrbanXrisis
Aug1-06, 12:15 AM
\left(\begin{array}{c}x \\y\\z \end{array}\right)\left(\begin{array}{ccc} cos45 & 0 & -sin45 \\ 0&1&0 \\ sin25&0&cos45 \end{array}\right)
would this be the matrix to rotate the z axis 45 degrees towards the x axis and around he y axis?
HallsofIvy
Aug1-06, 05:21 AM
Well, (1, 0, 0), on the x-axis, should be rotated to [itex](\frac{\sqrt{2}}{2}, 0, \frac{\sqrt{2}}{2}). Does your matrix do that?
(The answer is "no" for two reasons! First, you are multiplying the matrices in the wrong order. You can't multiply the matrices as you show them. Second, you have a typo, writing one of the angles as "25" rather than "45".)
UrbanXrisis
Aug1-06, 02:11 PM
this look better?
\left(\begin{array}{ccc}x &y&z \end{array}\right) \left( \begin{array}{ccc} cos45 & 0 & sin45 \\ 0&1&0 \\ -sin45&0&cos45 \end{array}\right)
this look better?
\left(\begin{array}{ccc}x &y&z \end{array}\right) \left( \begin{array}{ccc} cos45 & 0 & sin45 \\ 0&1&0 \\ -sin45&0&cos45 \end{array}\right)
Surprisingly, yes. But only because you did the inverse of an inverse. It gets you the correct result, but it's not set up in the standard way.
You only have one rotation matrix:
\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0&cos \theta& sin\theta \\ 0&-sin \theta&cos \theta \end{array}\right)
The '1' should be on the axis you're rotating around (xx, yy, or zz). Shift the rest of the matrix over and down as necessary (rows shifting off the bottom wrap around to the top; columns shifting off the right wrap around to the left).
The vector you're transforming should be written as a 3x1 matrix.
\left(\begin{array}{c}x\\y\\z \end{array}\right)
Your rotation matrix is multiplied by the vector. Since you're rotating about the y axis, it would look like this:
\left( \begin{array}{ccc} cos \theta & 0 & -sin \theta \\ 0&1& 0\\ sin\theta&0&cos \theta \end{array}\right) * \left(\begin{array}{c}x\\y\\z \end{array}\right)
The rotation is counter-clockwise. If you want to rotate clockwise, you need to the inverse of the rotation matrix you used. Since you're using an orthogonal rotation matrix, the inverse is just the transpose of the counter-clockwise rotation matrix.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.