Rotational Matrix
Rotational Matrix
Rotational Matrix
Figure 1. Coordinates of point p in two systems Write the (x,y) coordinates in terms of the (x,y) coordinates by inspection,
x = x ' cos y ' sin y = x ' sin + y ' cos
Multiplying on the left by the transpose of the matrix (it is orthogonal so transpose equals inverse),
sin x cos y 1
This represents the basic equation describing 2D rotations. Note that the sense of the angle u is defined by the right hand rule. A positive rotation means that if the thumb of the right hand is pointed along the positive direction of the rotation axis (z), then the fingers curl in the positive direction, i.e. counterclockwise. We will adopt the convention that rotation means a rotation of the coordinate axes, not the point . If the axes are rotated counterclockwise, then the point itself appears to rotate clockwise, with respect to fixed axes. See figures below.
Figure 2. Equivalence of rotating axes in one direction, and a point in the opposite direction Derivation of 3D Elementary Rotation Matrices We can extend the prior development into 3D rotations by constructing elementary 3D rotation matrices. The elementary 3D rotation matrices are constructed to perform rotations individually about the three coordinate axes. We begin with the rotation about the z-axis (photogrammetrists call it, k, or kappa), since it is virtually identical to what was just developed. We keep the same xy transformation but add an identity transformation for the z-coordinate, since it will not change during a rotation about the zaxis. See figure 3.
sin cos 0
0 x x 0 y = M y 1 z z
Figure 3. Rotation about the z-axis Next let us consider a rotation about the x-axis. Photogrammetrists call this rotation v, or omega. See the drawing in figure 4. We can relate this back to our prior derivation by letting the y-axis play the role of x, and letting the z-axis play the role of y. If we do that then we can write the 3D elementary rotation matrix directly by inspection, albeit with a coordinate component order that is not conventional. Then we can rearrange the order and thereby obtain the conventional elementary matrices. The equation, written by inspection,
sin x cos y 0 z
Figure 4. Rotation about the x-axis For the vector on the left we want to move the two top elements down, and we want to move the third element up to the top. This corresponds to moving the corresponding matrix rows in the same way. This completes the elementary rotation about x.
0 x x sin y = M y cos z z
Figure 5 shows a rotation about the y-axis. In order to be able to write the rotation matrix directly, imagine that the the z-axis is playing the role of the x-axis, and the x-axis is playing the role of the y-axis. With that coordinate order, we write the matrix directly, in terms of the angle, w (phi),
cos x 0 sin y 1 0 z 0
Figure 5. Rotation about the y-axis In order to put the elements of the vector on the left into the conventional xyz order, we must slide the bottom two matrix rows up, and move the top row down to the bottom.
0 sin x x 1 0 y = M y 0 cos z z
This completes the elementary rotation about y. These elementary matrices can be combined to create any 3D rotation. In photogrammetry the usual order of the rotations is omega (x) first, then phi (y), and lastly kappa (z). A matrix applied first is on the right, therefore the general composite rotation is,
M = M M M
cos sin + sin sin cos cos cos sin sin sin sin cos
sin sin cos sin cos sin cos + cos sin sin cos cos