| |
|
|
||||
![]() |
||||||
| |
|
|||||
|
Complex Matrix Transformations Simplified Math Notation for Matrix Concatenations The following is the component wise matrix multiplication for two 3x3 matrices and it is big.
The multiplication of two 4x4 matrices is even bigger. It is already a large bulky expression with just two matrices. No one ever gained any insight into matrix concatenation of transform matrices by looking at the product expressed by each component. Instead we'll substitute algebraic variables for the sections of a transform in order to come up with a much more intuitive notation. These are the components of a 4x4 column transform matrix:
The upper left 3x3 portion is a rotation and the far right column forms the translation. Let's simplify the matrix by making some definitions.
It is easy enough to do by hand. It is just four dot products between the rows on the left and the columns on the right. In the coming notation, many of the multiplications will be with one or zero so that will make it even easier. Up to this point, we haven't dealt with scale but it is easy enough to add.
This new notation allows us to study the effects of combining rotation, translation, and scale by combining building blocks for each one. Figure 7 defines a 2x2 rotation matrix that is really a representation of a 4x4 transform matrix. Likewise, Figure 8 defines a 2x2 scale matrix that represents a 4x4 transform matrix.
Figure 7: A 2x2 rotation matrix that represent a 4x4 transform
Figure 8: A 2x2 scale matrix that represents a 4x4 transform This notation is not concerned with whether R has rows or columns in it so the R matrix (Figure 7) is the same in both row and column conventions. S is a diagonal matrix so its 2x2 matrix (Figure 8) is the same in both row and column conventions. The 2x2 matrix for translation must change based on the row/column convention to reflect the location of the translation in the full 4x4 transform. Column
Convention (T is a column):
Column Convention With translation on the left and rotation on the right we get the familiar M1to0 matrix, represented as a 2x2.
Row Convention In order to get the familiar M1to0 row matrix, we need to put rotation on the left of the translation.
The other way around results in a rotated translation.
Now that the differences in the notation between row and column conventions have been shown, we'll only show the column convention to avoid repeating the same point. The column transform for figure 6 is shown below. The change is that we have to distinguish between the different rotations and translations by naming them differently with subscripts.
Now we experiment with scale. If we tack a scale matrix factor on the right of the product we get:
Right away you can see that the scale does not affect the translation (upper right portion of the product) at all because S doesn't appear in it. This makes sense because with columns, the full transform equation with points P0 and P5 included would look like this,
and it is just as though P5 was scaled and then the rest of the transform occurred afterwards. The given point was named P5 because each matrix is considered a transform from one space to another. If the scale is introduced on the left,
then every
term in the result is scaled, as you might expect. There are countless
combinations to explore. The notation makes it easier to form a complex
transform from intuitive simple pieces.
|
||||||||||||||
|
|