Archive | 2D RSS feed for this section

Optimization tip: faster 2D transforms

18 May

Drop the last column

A 2D transform is typically shown as a 3×3 augmented matrix. However the last column (or row depending which order you use) of an augmented matrix is always 0 0 1, so we don’t need to store it. We only store a 2×3 matrix.

\begin{bmatrix} a & b \\ c & d \\ e & f \end{bmatrix}

The 2 upper rows will contain the rotation, scale and shear factors, while the lower row contains the translation.
Continue reading