next up previous contents index
Next: Printing Error/Warning/Debugging Information Up: Miscellaneous Previous: Using numpy   Contents   Index


Using Transformations

Transform defines a transformation, which can be rotation, translation, scale, and their combinations.

Internally a transformation is stored in a 4x3 matrix. \( \left[ \begin{array}{ccc}
a&b&c\\
e&f&g\\
i&j&k\\
m&n&o\\
\end{array} \right] \)

The left-top 3x3 submatrix \(\left[ \begin{array}{ccc}
a& b& c\\
e& f& g\\
i& j& k\\
\end{array} \right] \) provides rotation, scaling and skewing.

Post translation is stored in \( \left[ \begin{array}{ccc}
m&n&o\\
\end{array} \right] \)

A separate vector containing the pretranslation, with an implicit column \( \left[ \begin{array}{c}
0\ 0\ 0\ 1\\
\end{array} \right] \)at the end when 4x4 multiplies are required.

The 'center of rotation' is NOT implemented as a separate vector, but as a combination of pre and post translations.



2013-06-11