Homogeneous square matrix (3x3, dedicated to 2D computations), whose coordinates are floating-point values (Real). Indices ranges for 0 to 2, the first index is the abscissa (left to right index) and the second one the ordinate (top to bottom index).
 refers to the matrix element located in the second column (1) at its top (0).
- Homogeneous matrices can be interpreted as block matrices.
For 2D needs, an HomogeneousMatrix3 [ r, t; 0, 1 ] could be used, where r is a 2x2 rotation matrix, and t a 2D translation vector.
- See also:
- Ceylan users guide for more details.
- Beware of counter-intuitive operator priorities.
The operations on homogeneous matrices take into account the fact that their bottom row is filled with zeroes but the last element, which is equal to one: they optimize computations using that hypothesis, that should be always enforced. Otherwise computations would be erroneous.
All matrix operations could be redefined so that for homogeneous matrices there would be no need to store their bottom row, since it is always made of zeroes and of one one.
This would however prevent from considering that an homogeneous matrix is a (particular case of) matrix (all of the matrix elements would be inherited), or force to add more complexity to the inheritance tree.