Skip to content
Part IA Michaelmas Term

Perspective Projection

How Perspective Works

Objects farther away appear smaller. Parallel lines converge to a vanishing point.

Perspective projection showing converging projectors to a single point

Geometry

For a camera at origin looking down z-z, with image plane at distance dd:

x=xdz,y=ydzx' = \frac{x \cdot d}{z}, \quad y' = \frac{y \cdot d}{z}

Perspective geometry with similar triangles

Matrix Form

Perspective can be expressed with a matrix:

[xdydzdz]=[d0000d0000d00010][xyz1]\begin{bmatrix} x \cdot d \\ y \cdot d \\ z \cdot d \\ z \end{bmatrix} = \begin{bmatrix} d & 0 & 0 & 0 \\ 0 & d & 0 & 0 \\ 0 & 0 & d & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix}

After dividing by w=zw = z: correct projected coordinates.

Why Preserve 1/z1/z?

The ww component stores zz, enabling:

  • Z-buffer interpolation (interpolate 1/z1/z, not zz)
  • Perspective-correct texture mapping

Properties

  • Realistic appearance
  • Distant objects smaller
  • Parallel lines converge
  • Used in games, film, photography

Summary

  • Perspective divides by zz: x=xd/zx' = xd/z, y=yd/zy' = yd/z
  • Preserves 1/z1/z for correct depth interpolation
  • Matches how cameras and eyes work