Perspective Projection — 2D Plan & Side ViewsThe same camera maths, drawn as similar triangles: where the rays cross the picture plane

Switch to 3D

Side view: similar trianglesdrag the pole top

Plan view: rays to the picture planedrag to turn the boxes

Picture plane image (what the camera records)

The science

A camera (or an eye) sits at one point. Every scene point sends a straight ray through that point; the image is where the ray pierces the picture plane. Because the plane is perpendicular to the viewing direction, each ray and its image form similar triangles, so the image height is the object height times f / z: the farther away, the smaller.

x' = f x / z,  y' = f y / z,  f = 1 / tan(FOV / 2) (frame half-width = 1)
equivalent focal length on a 36 mm wide sensor: fmm = 18 · f;  edge stretch of a small circle at the frame edge: 1 / cos2(FOV/2)
vanishing point of direction d = (dx, dy, dz): VP = (f dx/dz, f dy/dz)  (the ray from the eye parallel to d meets the picture plane there)

In the plan view a box edge with direction angle θ from the viewing axis has its vanishing point at x = f tan θ on the picture plane; the perpendicular edges vanish at x = −f / tan θ. Tilting the camera (pitch) makes the vertical edges converge too: three-point perspective.

Honest simplifications. Ideal pinhole camera: no lens distortion, no depth of field, no clipping other than "behind the eye"; the boxes are wireframes; lengths in the side and plan views are drawn to scale, the picture plane is placed at a fixed teaching distance (the maths does not depend on it). The scene (floor grid and three boxes) is the same as on the 3D page and is rotated, not the camera, as in that page.

Independent numerical checks