Geometric transformations

Translation;


rotation;


and scale.


Affine transformation can do translations, and rotations, and scales simultaneously:

x' = A x + B y + C
y' = D x + E y + F

Affine transformations generalize translations, rotations, and scales. A translation is:

x' = x + C (A = 1, B = 0)
y' = y + F (D = 0, E = 1)

A rotation is:

x' = sin(r) x + cos(r) y (A = sin(r), B = cos(r), C = 0)
y' = cos(r) x - sin(r) y (D = cos(r), E = -sin(r), F = 0)

And a scale is:

x' = A x (B = 0, C = 0)
y' = E y (D = 0, F = 0)

They are all special cases of affine transformations.

One way to generalize affine transformation would be to introduce a divisor:

x' = A x + B y + C
a x + b y + c
y' = D x + E y + F
a x + b y + c

But! There is another!

x' = A x + B y + C + D x y
y' = E x + F y + G + H x y