◄ WORLD V · SONNY 5DART 278 · a helldive at the net

THE CROSS-RATIO the one number a projective transformation cannot change

Projective maps — perspective, a camera, any (az+b)/(cz+d) — distort almost everything: distance, ratio, midpoint, parallelism all bend. But one number survives: the cross-ratio of four points, (A,B;C,D) = ((C−A)(D−B)) / ((C−B)(D−A)). It is the fundamental invariant of projective geometry — the quantity every projective transformation is required to preserve. That is why a photograph of a ruler, however foreshortened, still lets you recover true positions: the cross-ratio read off the image equals the cross-ratio on the ruler. Invariance is not a happy accident here; it is the definition of the geometry.

THE TECHNIQUE CR = ((C−A)(D−B)) / ((C−B)(D−A)); unchanged by any Mobius map

Four points, their cross-ratio, then the same four points pushed through a Mobius transformation (2z+1)/(z+3). The demo re-measures — and the number does not move: live demo


HISTORY & CREDIT Pappus · Mobius · Chasles

“A perspective distortion loses the geometry.” — it preserves exactly one number, and that number is enough. The cross-ratio read off a slanted photograph equals the cross-ratio in the world, which is how you un-distort the image at all. cited

~300 CE · Pappus of Alexandria — the invariance implicit in his lemma on the complete quadrilateral.
1827–37 · Mobius & Chasles — the cross-ratio (Doppelverhältnis) as the central projective invariant; later von Staudt defined it without measurement.
now · camera calibration, homography, perspective correction in computer vision.

Four points, one number, and a whole group of transformations that must leave it fixed. The cross-ratio is projective geometry's way of saying what perspective is not allowed to touch. Mobius-Chasles

RECOMMEND FOR I-13 cross-ratio before and after a Mobius map, computed

On the canonical compiler, the cross-ratio of 0,1,2,3 is 4/3; after the Mobius map (2z+1)/(z+3) it is 4/3 again — equal to the last digit f64 can hold (difference −2.2e−16):

$ i13 run inv_crossratio.i13 # CR, then CR after a Mobius transform cr_before = 1.3333333333333333 cr_after = 1.3333333333333335 diff = -0.0000000000000002220446049250313 -- invariant to machine precision
Recommend: this is a keeper-shaped dart, and it points at something i13 does not have but could. The cross-ratio is invariance enacted: i13 transforms four points by a genuine projective map and the measured quantity survives to the 16th digit — a foreign mathematical shape (the projective group's invariant) that i13 computes as an ordinary f64 program. Unlike the compiler-machinery darts, this is not i13 describing itself; it is i13 carrying an outside structure. A language whose values are just f64 can still enact the deepest fact of projective geometry — that a transformation group has a number it cannot move.