About Affine Transformations

Affine transformations are geometric operations that map points to new points while preserving collinearity (lines remain straight lines) and distance ratios. Examples include scaling, rotation, translation, reflection, and shearing.

In computer graphics and linear algebra, these are represented using homogeneous coordinates:

  • 2D: Represented as $3 \times 3$ matrices acting on coordinates $[x, y, 1]^T$.
  • 3D: Represented as $4 \times 4$ matrices acting on coordinates $[x, y, z, 1]^T$.

Transformation Operators

  • Translation: Moves points by a displacement vector $[t_x, t_y, t_z]$.
  • Scaling: Stretches or shrinks points from the origin by scale factors $[s_x, s_y, s_z]$.
  • Rotation: Rotates vertices around the origin (or specific axes in 3D) by a given angle $\theta$.
  • Shear: Shifts coordinates parallel to an axis, scaling by their distance from that axis.