THE PERSPECTIVE PROJECTION

The matrix that makes distant things small, the way an eye sees. A view-space point runs through a 4×4 frustum matrix into clip space; the perspective divide by w = −z lands it in normalized device coordinates. Two points on the same ray from the eye hit the same pixel; the nearer one is drawn larger. The shrink is not the matrix — it is the division.

source Foley, van Dam, Feiner & Hughes, Computer Graphics: Principles and Practice, 2nd ed., Addison-Wesley (1990), §6 — and Blinn, Jim Blinn's Corner: A Trip Down the Graphics Pipeline, IEEE CG&A (1991). No stable open DOI for the derivation — catalog, marked AMBER.
Rendered, not quoted.
Blue Team · builds & defends

3 THE MODEL

A symmetric frustum with near n, far f, half-extent r,t. The projection is linear; the shrink comes after, at the divide.

P = [ n/r 0 0 0 ] [ 0 n/t 0 0 ] [ 0 0 -(f+n)/(f-n) -2fn/(f-n) ] [ 0 0 -1 0 ] clip = P · (x,y,z,1) w = -z ndc = clip / w (the divide)

Here n=1, f=5, r=1, t=1 (a 90° symmetric view). The bottom row copies -z into w; every later coordinate is divided by depth.

5 THE LINEAGE

The eye's geometry, made linear. Renaissance painters found the vanishing point by hand; homogeneous coordinates turn that construction into one 4×4 matrix. This sphere sits downstream of the-homogeneous-coordinates — the extra w axis is exactly what lets a division (a non-linear act) be carried by a linear transform. The perspective divide is where 3D becomes a flat image.

7 THE WITNESS

Live re-check of the defining property: at double depth, screen size must halve (ratio = 2). Runs against the engine's current mode.

witness idle

If window 6 swaps in the orthographic matrix, the ratio falls to 1 and this badge flips red.

The machine

4 DATA IN in ↓

frustum   n=1 f=5 r=1 t=1

ray point   P1 = (0.5, 0.3, −2)

same ray   P2 = 2·P1 = (1.0, 0.6, −4)

depth probes   z = −1 (near), −5 (far)

size probe   half-width 0.5 at z=−2 and z=−4

↓ project & divide ↓

0 THE PANEL LIT

Points in view space, projected live through the current matrix and divided by w. Under perspective the far markers shrink; the near marker fills the frame.

 

↓ proven result ↓

8 DATA OUT out ↓

same ray → same pixel   ndc(P1)=ndc(P2)=(0.25, 0.15)

near plane → ndc.z = −1   far plane → ndc.z = +1

divisor   w = −z (w=2 at z=−2)

size(z=−2)/size(z=−4) = 2   (half at double depth)

boot pending
Red Team · attacks & breaks

1 THE ADVERSARY WALL

z = 0 kills it. A point on the eye plane makes w = 0: division by zero. The near clip plane is not decoration — it forbids exactly this.
Behind the eye wraps. For z > 0, w = -z is negative; the divide flips sign and drags points across infinity. Such vertices must be clipped in clip space, before the divide, never after.
1/z is not linear. Depth precision piles up near the camera and starves far away — z-fighting. Reversed-Z or a floating depth buffer is the standard defence.

2 THE GRAVEYARD

Perspective is just scaling every point by one constant.
→ the scale is 1/(−z): it depends on each point's depth. That dependence is the whole effect.

The w component is meaningless homogeneous padding.
→ w carries −z, and it is the divisor. Drop the coupling and depth stops mattering.

A far object is small because the matrix multiplies it by a small number.
→ the matrix is linear and does no shrinking; the shrink happens at the perspective divide.

6 THE TAMPER

The disclosed planted void. Swap the perspective matrix for an orthographic one: w stays 1, the −z coupling is gone, so distant markers no longer shrink. The witness in 7 catches it live.

mode: perspective (intact)