What survives

What a projection destroys

A projection loses length, angle, area and the ratio in which a point divides a segment. Exactly one quantity comes through untouched, and almost everything that can be checked about a picture is checked with it — including, as it turns out, some things it cannot check at all.

Put four marks on a straight line on the ground, a metre apart. Photograph them from an angle. In the photograph they are still on a straight line — that much survives — but they are no longer a metre apart, and they are not even equally spaced. The near gaps are wide and the far ones are narrow, and if the line runs far enough the last few marks pile up against a point they never reach.

So the projection destroyed the distances. It also destroyed the ratio between them: on the ground the first gap and the third gap were equal, and in the picture they are not. It destroyed angles, because two lines meeting at a right angle in the world meet at some other angle in the picture. It destroyed areas, and it destroyed the property of being a midpoint.

That is a great deal of destruction, and the natural question is whether anything at all is left.

Four points on a line, before and after a projectionLength and the ratio of lengths do not survive the projection; the cross-ratio does, agreeing to 0e+0 relative.horizonABCDon the groundin the picturelength AB1.00011.3930ratio AB:CD0.56670.6837cross-ratio1.31681.3168correct from 26 cm, at 160 mm wide34° across
Fig. 1 Four points on a ground line and their images. The table underneath measures three quantities before and after: a length, the ratio of two lengths, and the cross-ratio. The first two change. The third agrees to two parts in 10¹⁶, which is the arithmetic and not the geometry.

The quantity that comes through

Something is left, and it is the only thing.

Take four points on a line, in order, and call them A, B, C and D. Form the ratio in which C divides AB, form the ratio in which D divides AB, and divide one by the other. Written out:

(A,B;C,D)=ACBCBDAD(A,B;C,D) = \frac{AC}{BC} \cdot \frac{BD}{AD}

This is the cross-ratio, and it is invariant under projection. Project the four points from any centre onto any plane and the number is unchanged. Project again and it is still unchanged. Compose a hundred projections and it is the same number.

The measurement in the figure above puts it at two parts in 10¹⁶, which is double-precision arithmetic doing as well as it can. Nothing about the geometry is approximate.

Why it is a ratio of ratios

The reason a ratio of ratios survives when a ratio does not is worth spelling out, because the shape of the argument recurs.

A projection of a line onto another line, from a point, is a projective map. In coordinates along the two lines it is a Möbius transformation: a fractional-linear function that sends a parameter t to (at + b)/(ct + d). The numerator and denominator are both linear, and the division by a term containing t is where the damage happens — it is what makes far things small.

A single difference of parameters, t₂ − t₁, picks up a factor from the denominator at each end. A ratio of two differences cancels one such factor. A ratio of ratios — four differences, two in the numerator and two in the denominator — cancels all of them, and what is left does not depend on a, b, c or d at all.

So the cross-ratio is not a lucky find. It is the simplest expression with enough differences in it for the denominators to cancel, and there is nothing simpler that works. That is why it is the invariant rather than one of several.

The point at infinity earns its keep

The construction has a special case that turns out to be the most useful one.

If D is taken infinitely far away along the line — which in the picture means at the vanishing point — the two factors containing D become equal in the limit and cancel, and the cross-ratio collapses to the ordinary ratio AC/BC. So the cross-ratio of three points and a vanishing point is a simple ratio measured in the world.

For three equally spaced world points and the point at infinity that ratio is 2. That number is worth remembering, because it is what makes the invariant into a working check: three divisions of a receding row and the vanishing point they head toward must give 2, and a row spaced by judgement has no reason to.

The special case is also the cleanest statement of what the horizon actually is. It is not a line drawn at a convenient height; it is the image of the points at infinity, and treating it as an ordinary point of the picture — one that can enter a cross-ratio like any other — is what makes it computable rather than atmospheric.

A family of parallel ground lines at 30°, and where they meetAll five lines pass through one point on the horizon, off the edge of the frame at x = 1464.horizon — the image of the line at infinityvanishing point at x = 1464 — off the framecorrect from 26 cm, at 160 mm wide34° across
Fig. 2 The vanishing point of a family of ground lines, found from the drawn lines rather than from the direction they came from. Turning the family walks the point along the horizon and off the end of the frame.

A necessary condition is not a test

Here is where this essay had to be rewritten.

The obvious way to use the invariant on a suspect drawing: take four consecutive divisions of a receding row, compute their cross-ratio, and compare it with the value four equally spaced points must produce. If the drawing is a projection of an equally spaced row, the numbers agree.

The value for four equally spaced points is 4/3. So a correctly projected row gives 4/3.

And a row whose divisions are equally spaced in the picture also gives 4/3, because four equally spaced points give 4/3 wherever they are. The most common wrong construction there is — dividing the distance to the horizon into equal parts — passes this test perfectly, to sixteen digits.

The invariant is doing its job. It is invariant, and the two configurations genuinely have the same cross-ratio, so no measurement of that cross-ratio can tell them apart. What failed was the reasoning around it: a projection preserves the cross-ratio, therefore a construction that preserves the cross-ratio might be a projection. Might. The condition is necessary and it is not sufficient, and a check that only knows the first half will certify a wrong construction and report a perfect score while doing it.

The fix is the special case above. Use three divisions and the vanishing point as the fourth point, where the correct value is 2, and the equal-steps construction fails by 14%.

Two versions of the same invariant, one of which measures nothingFour consecutive divisions give the equal-steps method a perfect score. Using the vanishing point as the fourth point rejects it by 14%.error against the value the projection must producefour divisionsthree plus the VPthe projectionexactexactequal stepsexact14%halving3.6%25%tapering0.9%21%green: agrees with the projectiona necessary condition is not a test
Fig. 3 The two versions of the same invariant. The left column is four consecutive divisions, which gives the equal-steps method an exact pass. The right column uses the vanishing point as the fourth point, and rejects all three by-eye methods.

What else the cross-ratio is for

Once the invariant is in hand, several things become computable that otherwise are matters of judgement.

Measuring a building from a photograph. Three known heights on a façade and the vertical vanishing point give a cross-ratio, and a fourth unknown height can be solved from it. This is the basis of single-view metrology, and it needs no camera calibration at all — the cross-ratio does not care what lens took the photograph.

Checking that a drawing is a projection. Four collinear points whose cross-ratio does not match the world’s is proof that no camera produced the picture. This is a refutation rather than a certification, for the reason the last section gives, and refutations are still worth having.

The harmonic range. A cross-ratio of −1 is a configuration called harmonic, and it appears constantly: the two ends of a segment, its midpoint and the point at infinity form one. So do a point, its polar, and the two intersections of any line through it with a conic. The complete quadrilateral construction produces harmonic ranges with a ruler and no measurement at all, which is how the diagonal method of dividing a rectangle works and why it needs no numbers.

Angles: destroyed, but recoverable

Angle is destroyed by projection, and there is a caveat that keeps a great deal of the subject alive.

The angle between two lines in the picture is not the angle between the world lines they came from. But if the two world directions are known to be perpendicular, their two vanishing points and the principal point satisfy a relation that pins down the focal length. So the angle is not preserved and it is not lost either: it is recoverable, from the vanishing points, given one extra piece of information.

That is the whole basis of recovering a camera from a picture, and it is worth noticing how narrow the escape is. Nothing about the drawn angle between two edges tells anything about the world angle. It is the vanishing points — points at infinity, which have no visible extent and are usually off the edge of the paper — that carry the information.

The three vanishing points of one box, drawn to scale with the boxThe picture is the small rectangle. Two of the three vanishing points fall well outside it, which is why they are computed rather than located by eye.the pictureVP₁VP₂VP₃orthocentrefocal length from the triangle — 707.4 pxspread 0e+0% across three routes
Fig. 4 The three vanishing points of one box, drawn to scale with the box itself. The picture is the small rectangle. Two of the three are well outside it, which is why the recovery is a computation.

What a conic does

Straightness survives a projection: a straight world line images to a straight picture line, always. That is the property that makes the whole subject tractable, and it extends to conics — a circle images to a conic, an ellipse to a conic, a parabola to a conic.

What does not survive is which conic. A circle can image to an ellipse, a parabola or a hyperbola depending on where the picture plane cuts the cone of rays, and none of the three is more correct than the others. The distinction between the conic types is a distinction the projection does not respect.

Nor does the centre. The image of a circle is an ellipse, and the image of the circle’s centre is not the centre of that ellipse — a gap that is measurable and is usually 3 or 4% of the ellipse’s own width, which is enough to be visible and small enough to be dismissed as a drawing error by anyone not expecting it.

Reading the list backwards

The destruction list at the top of this essay is more useful read as a list of things a picture cannot be asked.

A picture cannot be asked how long something is; that requires a scale, which means an extra piece of world knowledge. It cannot be asked what angle two edges meet at, without knowing something about the directions involved. It cannot be asked whether a point is halfway along a line, because halfway does not survive — and a parallel drawing of the same scene can be asked that, which is exactly the difference between the two families.

It can be asked whether four points are collinear, whether a line passes through a point, whether a conic passes through five, and what a cross-ratio is. That is the vocabulary, and it is small. Every check on this site is built out of those four things, because there is nothing else that a projection leaves intact to build with.

A box drawn from a known camera, and the camera recovered from the drawingThree vanishing points found from the twelve drawn edges alone give back the focal length to 4e-15 relative.recovered principal pointused to drawrecoveredgapfocal length853.90853.904e-15principal x345.0345.02e-12angle44.0°44.0°correct from 20 cm, at 160 mm wide44° across
Fig. 5 The vocabulary put to work: incidence, collinearity and one relation between vanishing points, recovering a focal length from twelve drawn line segments.

The habit this leaves

Two lessons survive from this essay into the rest of the site, and the second is the one that cost something to learn.

The first: when a claim about a picture needs checking, express it in the invariant vocabulary or it cannot be checked at all. Length, angle and midpoint are not available. Incidence, collinearity, conics and cross-ratio are.

The second: an invariant tells what a correct construction must satisfy, and satisfying it is not the same as being correct. The cross-ratio of four consecutive divisions gave a wrong method a perfect score, and only including the point at infinity — the point that is not really in the picture at all — turned the check into a test. Any check that has never been shown to reject something is a check whose passing means nothing, which is why the site’s own gate tries to break every assertion it makes and requires each one to notice.

Why this is called projective geometry rather than perspective

The subject this essay is doing has a name, and the name marks a genuine change of footing that happened in the seventeenth century and again in the nineteenth.

Renaissance perspective is a construction: a recipe for getting a correct picture, expressed in terms of a picture plane, an eye, a horizon and a set of steps. It is enormously practical and its statements are about a particular arrangement of a particular scene.

Projective geometry is what is left when the construction is thrown away and only the invariant relations are kept. Desargues began it in 1639 by noticing that many separate results about conics were one result seen from different centres of projection; Poncelet, working out the consequences as a prisoner of war in Russia after 1812, made it a subject. Its statements are about incidence, cross-ratio and duality, and they hold for every projection at once rather than for the one being drawn.

The practical consequence is the one this site runs on. A statement in the construction’s vocabulary — the horizon goes here, the vanishing point goes there — can only be checked by comparing it with another construction, which is how the taught methods go unexamined for centuries. A statement in the invariant vocabulary can be checked against a projection, numerically, and the check either passes or produces a number.

A circle on the ground, and the two points that get called its centreThe image of the centre and the centre of the image ellipse are 21.1px apart — 5.1% of the ellipse's own width.centre of the ellipseimage of the centrecorrect from 22 cm, at 160 mm wideoffset 21.1 px
Fig. 6 Straightness survives and centrality does not. The image of the circle’s centre and the centre of the image ellipse are two different points, 14 px apart here — 3.6% of the ellipse’s own width.

Duality, which is free and useful

One more property of the invariant vocabulary earns its place, because it halves the work.

In the projective plane, points and lines are interchangeable. Every true statement about points lying on lines becomes a true statement about lines passing through points when the two words are swapped. Two points determine a line; two lines determine a point. Three points are collinear; three lines are concurrent.

This is not an analogy. It is a symmetry of the axioms, and it means every construction has a dual construction that comes for free.

It also explains something that would otherwise be an awkward special case. Two parallel lines have no intersection in ordinary geometry, which makes “two lines determine a point” false and breaks the duality. Adding the points at infinity repairs it: parallel lines meet at one, every pair of lines now meets exactly once, and the exception disappears. The horizon is the line made of all the ground plane’s points at infinity, which is why it behaves like an ordinary line in every calculation on this site — it can be intersected, joined and entered into a cross-ratio like any other.

The points at infinity are often introduced as a convenience, a bookkeeping device to avoid special cases. That undersells them. They are where the whole of perspective happens: a vanishing point is a point at infinity, seen, and the reason a picture has vanishing points at all is that projection maps the plane at infinity to an ordinary line in the image. Everything convergent in a picture is the image of something parallel, and everything parallel meets in a place the ordinary plane does not have.

What is worth carrying forward

The cross-ratio is the residual of this site in the sense that a loop-closure residual is the residual of a mechanism: the quantity that must come out right, that is cheap to compute, and that fails loudly when the geometry is wrong.

It is not sufficient on its own, as the equal-steps row demonstrated by passing. Used with the vanishing point as the fourth point it becomes a test rather than a formality, and every claim on this site that a construction is or is not a projection is made in its terms.