Five Building Blocks
Translation, Rotation, Scaling, Reflection, Shearing. Each maps a point (x, y) to a new point (x', y').
Translation
x' = x + tx, y' = y + ty. Moves geometry without distorting it. Translation is not a linear map (it does not fix the origin), which is why we will use homogeneous coordinates.
Rotation about Origin (counter-clockwise by theta)
x' = x cos(theta) - y sin(theta) y' = x sin(theta) + y cos(theta) Matrix: [ cos -sin ] [ sin cos ] Rotation about an arbitrary point (px, py) = translate(-px,-py) -> rotate(theta) -> translate(+px, +py).
Scaling
x' = sx x, y' = sy y. About origin. Uniform scale sx = sy preserves shape; non-uniform stretches. Matrix: [ sx 0 ] [ 0 sy ]
Reflection
- Across X-axis: (x, y) -> (x, -y).
- Across Y-axis: (x, y) -> (-x, y).
- Across origin: (x, y) -> (-x, -y).
- Across line y = x: (x, y) -> (y, x).
Reflection is scaling with a -1 in the appropriate axis or a 90-degree composition.
Shear
- X-shear by shx: x' = x + shx * y, y' = y. Slants vertical lines.
- Y-shear by shy: x' = x, y' = shy * x + y.
Used in italic fonts and oblique projections.
Numerical Example
Triangle A(2,1), B(5,1), C(2,4). Translate by (3, 2): A' = (5,3), B' = (8,3), C' = (5,6). Then rotate 90 deg about origin: A'' = (-3, 5), B'' = (-3, 8), C'' = (-6, 5).
Effect on Geometry
- Translation, rotation, reflection: preserve distances and angles -> rigid / isometric.
- Uniform scale: preserves angles, scales distances -> conformal.
- Non-uniform scale and shear: do not preserve angles -> affine but not rigid.
- All five together generate the affine group.