← Back

01 TRANSLATION

Translation moves a shape from one place to another without changing its size, shape, or direction.

💡
Example:
Move 3 units right and 2 units up.
[1 0 tx]
[0 1 ty]
[0 0 1]
x y (x, y) (x+tx, y+ty)

02 SCALING

Scaling changes the size of a shape. It can make the shape bigger or smaller, but the shape and direction remain the same.

💡
Example:
Scale 2 times in x direction and 1.5 times in y direction.
[sx 0 0]
[0 sy 0]
[0 0 1]
x y (x, y) (sx*x, sy*y)

03 REFLECTION

Reflection flips a shape over a line called the axis of reflection.
The shape appears as a mirror image.

  • Over x-axis: flips up and down.
  • Over y-axis: flips left and right.
Over x-axis:
[ 1  0  0 ]
[ 0 -1  0 ]
[ 0  0  1 ]
Over y-axis:
[-1  0  0 ]
[ 0  1  0 ]
[ 0  0  1 ]
x y Over x-axis x y Over y-axis

04 SHEARING

Shearing slants a shape in a specific direction. It changes the shape into a skewed form but keeps the parallel lines parallel.

💡
Example:
Shear in x direction by factor k.
Shear in x direction:
[ 1  k  0 ]
[ 0  1  0 ]
[ 0  0  1 ]
Shear in y direction:
[ 1  0  0 ]
[ k  1  0 ]
[ 0  0  1 ]
x y Shear in x direction (x', y') = (x+ky, y) x y Shear in y direction (x', y') = (x, y+kx)

05 ROTATION

Rotation turns a shape around a fixed point called the origin by a certain angle.

🔄
Example:
Rotate by angle θ (counterclockwise).
[ cosθ -sinθ  0 ]
[ sinθ  cosθ  0 ]
[  0     0    1 ]
x y θ