Skip to main content

Derive parallel projection matrix

Short answer

For projectors direction d=(dx,dy,dz) onto plane z=zvp: xp = x − (dx/dz)(z−zvp), yp = y − (dy/dz)(z−zvp). Matrix rows: (1,0,−dx/dz, zvp·dx/dz) and (0,1,−dy/dz, zvp·dy/dz) with zp = zvp. Orthographic: dx=dy=0; oblique: −dx/dz = L cos φ, −dy/dz = L sin φ.

Derive the transformation matrix for parallel projection.

In parallel projection, all projectors are parallel to a given direction d = (dx, dy, dz). The view plane is z = zvp.

Derivation: a point P(x, y, z) is projected along the direction d. The projector through P is

(x', y', z') = (x, y, z) + t·(dx, dy, dz)

It meets the view plane when z' = zvp:

t = (zvp − z)/dz

Therefore

  • xp = x + dx·(zvp − z)/dz = x − (dx/dz)(z − zvp)
  • yp = y − (dy/dz)(z − zvp)
  • zp = zvp

Matrix:

| xp |   | 1 0 -dx/dz  zvp·dx/dz | | x |
| yp | = | 0 1 -dy/dz  zvp·dy/dz | | y |
| zp |   | 0 0  0      zvp       | | z |
| 1  |   | 0 0  0      1         | | 1 |

Special cases

  1. Orthographic projection (projectors perpendicular to the plane, d = (0, 0, 1)): dx = dy = 0, so xp = x, yp = y, zp = zvp. For zvp = 0:
| 1 0 0 0 |
| 0 1 0 0 |
| 0 0 0 0 |
| 0 0 0 1 |
  1. Oblique projection (d not perpendicular): with −dx/dz = L1cosφ and −dy/dz = L1sinφ, the matrix becomes the standard oblique matrix with entries L1cosφ and L1sinφ in the third column.

Parallel lines remain parallel and the size of faces parallel to the view plane is unchanged.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 4 questions →