The Problem
Translation cannot be represented as a 2×2 matrix multiplication on 2D vectors. We need an additive term.
The Solution
Add a third coordinate w:
2D point (x,y)≡Homogeneous (x,y,1)
More generally:
(x,y,w)≡(wx,wy)
Properties
An infinite number of homogeneous coordinates map to each 2D point:
- (1,2,1)≡(2,4,2)≡(3,6,3)
When w=0: Point at infinity (direction vector).
Scale (factor m)
x′y′w′=m000m0001xyw
Rotate (angle θ)
x′y′w′=cosθsinθ0−sinθcosθ0001xyw
Translate (by (xo,yo))
x′y′w′=100010xoyo1xyw
Shear (factor a)
x′y′w′=100a10001xyw

3D Homogeneous Coordinates
A 3D point (x,y,z) is represented as (x,y,z,w):
(x,y,z,w)≡(wx,wy,wz)
Points vs Vectors
| Type | w | Affected by Translation? |
|---|
| Point | 1 | Yes |
| Vector | 0 | No |
Vectors represent directions and should not be translated.
Summary
- Homogeneous coordinates add w to represent translation as matrix multiplication
- Points: w=1; Vectors: w=0
- All affine transforms are now uniform matrix multiplications