What survives

An angle is a cross-ratio

A projection destroys angle, which every account of perspective says and a direct measurement confirms. It destroys it only in the sense that the picture no longer carries it for free — because an angle is a cross-ratio taken against two particular points, and once those two points are located in a photograph the world's angles can be read off it directly, with no rectification, no camera, and nothing measured but which lines pass through which points.

Worth reading first: What a projection destroys · A point and a line are one object · The circle whose centre moves.

The first essay in this field says what a projection destroys: length, angle, area, and the ratio in which a point divides a segment. What survives is the cross-ratio, and the whole projective half of this site is built on that one surviving quantity.

The list is accurate and the word destroys is doing something misleading in it, because two of those four are destroyed in quite different senses. Length is destroyed absolutely: a picture of a scene is identical to a picture of a scene 137×137\times larger from 137×137\times further away, so no operation on the picture can recover a length, ever.

Angle is not like that. This essay shows that an angle is a cross-ratio — a particular one, taken against two particular points — so it is not a different kind of quantity from the one that survives. It is the surviving quantity, evaluated at a place the picture does not label.

Two ground lines at 90°, and the picture says soThe two lines cross at 80.43° on the paper. Taking the cross-ratio of the pair with the two lines from their crossing point to the imaged circular points, and halving the logarithm's imaginary part, returns 90.000000° — the angle in the world, with no rectification anywhere.horizonv_zthe horizon misses the imaged circle, so the two points are a conjugate pairprotractor on the paper: 80.43° · cross-ratio: 90.000000°correct from 21 cm, at 160 mm wide42° across
Fig. 1 Two ground lines crossing at a right angle in the world. On the paper they cross at 80.4°, which is what a protractor laid on the photograph reports. Taking the cross-ratio of the pair against the two lines to the imaged circular points returns 90.000000°.

The two points

Every circle in a plane passes through the same two points, and they are not real.

Write a circle as x2+y2+Dx+Ey+F=0x^2 + y^2 + Dx + Ey + F = 0 and homogenise it: x2+y2+Dxz+Eyz+Fz2=0x^2 + y^2 + Dxz + Eyz + Fz^2 = 0. Set z=0z = 0 to find where it meets the line at infinity, and the quadratic reduces to x2+y2=0x^2 + y^2 = 0, whose solutions are x=±iyx = \pm i y. So every circle meets the line at infinity at

I=(1,i,0),J=(1,−i,0)\mathbf{I} = (1, i, 0), \qquad \mathbf{J} = (1, -i, 0)

and those two points do not depend on the circle’s centre or its radius. They are properties of the plane’s metric structure rather than of any figure in it, and they are called the circular points.

Two facts make them worth having. Every similarity of the plane fixes them, and no other projectivity does — which means the circular points are the plane’s metric structure, in the exact sense that knowing where they are is knowing which projectivities are similarities. And an angle can be computed from them.

Laguerre’s formula

Take two real lines l1l_1 and l2l_2 meeting at a point PP, and the two lines joining PP to I\mathbf{I} and to J\mathbf{J}. All four pass through PP, so they form a pencil, and four concurrent lines have a cross-ratio — the same quantity four collinear points have, arrived at by the duality this field already builds.

Laguerre’s formula says the angle between the two real lines is

θ=12i log⁡ CR(l1,l2;lI,lJ)\theta = \frac{1}{2i}\,\log\,\mathrm{CR}(l_1, l_2 ; l_{\mathbf{I}}, l_{\mathbf{J}})

That looks like a formula that would need a great deal of care and it does not. Writing a line at angle α\alpha through the origin as (−sin⁡α,cos⁡α,0)(-\sin\alpha, \cos\alpha, 0) and expanding, the cross-ratio comes out as e−2i(α2−α1)e^{-2i(\alpha_2 - \alpha_1)}, so a half of the logarithm’s imaginary part is α1−α2\alpha_1 - \alpha_2 exactly. There is no approximation anywhere in it.

The site’s control checks that: forty-two ordered pairs of lines at seven stated angles, and the worst departure from the protractor’s answer is 1.4e-14 degrees. The real part of the logarithm — the residue, which must vanish for two real lines and is what a sign error in the pencil basis moves — is under 10−1610^{-16}.

Why the pencil rather than a transversal

There is a detail in the implementation that is forced by the complex members, and it is worth a paragraph because the natural alternative silently fails.

The cross-ratio of four concurrent lines is usually computed by cutting them with any transversal and taking the cross-ratio of the four intersection points, which is a theorem: the answer does not depend on the transversal. That route is unavailable here, because two of the four lines are complex and do not meet a real transversal anywhere useful.

So the cross-ratio is computed in the pencil. Any two members span it, so each of the four can be written as α l1+β l2\alpha\,l_1 + \beta\,l_2, and the parameter α/β\alpha/\beta plays the role of a coordinate along the pencil. With l1l_1 at ∞\infty and l2l_2 at 00 the four-term cross-ratio collapses to the ratio of the other two parameters, which is one complex division.

The solve for α\alpha and β\beta is done in the two best-conditioned of the three coordinates and checked against the third, because a line whose third coordinate is the one that determines the answer would otherwise be solved for in the coordinate carrying no information. That check is what catches a line not actually in the pencil, which is what a mis-computed meeting point produces.

What the residue is measuring

The cross-ratio comes out as e−2i(α2−α1)e^{-2i(\alpha_2-\alpha_1)}, whose modulus is exactly one, so the logarithm’s real part — the residue — is log⁡∣CR∣\log|\mathrm{CR}| and vanishes identically for two real lines against a genuine conjugate pair.

That makes the residue a calibration check rather than a numerical one, and it is worth knowing which. If I\mathbf I and J\mathbf J are constructed as conjugates by fiat, the residue is zero by construction and reports nothing. If they are recovered — from a fitted conic, from an involution, from the intersection of a measured vanishing line with a measured circle — then noise moves them independently and they need not remain a conjugate pair. The residue is exactly the amount by which they fail to be, and a reader with a non-zero residue has a picture whose recovered circular points are inconsistent, which is a fault in the calibration rather than in the angle.

So the honest reading is: the imaginary part is the answer and the real part is the diagnostic, and the diagnostic is live only when the pair was measured. Reporting a residue of 10−1610^{-16} on a constructed pair is reporting the arithmetic; reporting one on a recovered pair is reporting the picture.

And the angle is a line-angle, not a ray-angle

One limitation the formula carries and the protractor does not. e−2iΔe^{-2i\Delta} has period π\pi in Δ\Delta, so the recovered angle is defined modulo 180° — which is right, because the objects are lines and a line has no direction. Two rays at 30° and two rays at 210° span the same pair of lines and the formula cannot separate them.

That is the correct behaviour and it means the formula answers a slightly different question from the one a reader may have. “What is the angle between these two edges” is a line question and the formula answers it; “which way does this edge point relative to that one” is a ray question and needs a sign supplied from outside the projective data. Which is the same shortfall the reversal has one dimension up: projective geometry knows about lines and planes, and a direction along one of them is an orientation the picture does not carry.

The cross-ratio does not care which pencil

Everything so far is in the world’s own coordinates, where the circular points are known exactly and the formula is a re-description of the protractor. What makes it useful is the next step, and it needs no new idea.

A projection carries lines to lines, points to points, incidences to incidences, and cross-ratios to equal cross-ratios. So it carries the whole configuration — two lines, their meeting point, and the two lines from that point to I\mathbf{I} and J\mathbf{J} — to a configuration of exactly the same shape in the picture, with the same cross-ratio.

The images of I\mathbf{I} and J\mathbf{J} are two points in the picture. They are not at infinity any more, because the projection has brought the plane’s line at infinity down to the horizon. They are still complex, and complex is not a difficulty: the cross-ratio is an algebraic expression in coordinates and works over the complex numbers without modification.

So: locate the images of the circular points in the photograph, and the same formula returns the world’s angle between any two lines of that plane.

Two ground lines at 160°, and the picture says soThe two lines cross at 5.14° on the paper. Taking the cross-ratio of the pair with the two lines from their crossing point to the imaged circular points, and halving the logarithm's imaginary part, returns 160.000000° — the angle in the world, with no rectification anywhere.horizonv_zthe horizon misses the imaged circle, so the two points are a conjugate pairprotractor on the paper: 5.14° · cross-ratio: 160.000000°correct from 21 cm, at 160 mm wide42° across
Fig. 2 The same construction at a different angle. The paper says 5.1° and the cross-ratio says 160.000000°, which is the world’s angle — the two are unrelated because the picture is oblique.
Two ground lines at 20°, and the picture says soThe two lines cross at 174.69° on the paper. Taking the cross-ratio of the pair with the two lines from their crossing point to the imaged circular points, and halving the logarithm's imaginary part, returns 20.000000° — the angle in the world, with no rectification anywhere.horizonv_zthe horizon misses the imaged circle, so the two points are a conjugate pairprotractor on the paper: 174.69° · cross-ratio: 20.000000°correct from 21 cm, at 160 mm wide42° across
Fig. 3 And the other extreme. The drawn angle runs from a few degrees to nearly 180° across the slider while the recovered angle tracks the world’s exactly, which is the claim in one drag.

Finding them

The imaged circular points are where the plane’s vanishing line meets the image of any circle in the plane.

That falls out of the two facts already stated. The circular points lie on the plane’s line at infinity, so their images lie on its image, the horizon. They lie on every circle in the plane, so their images lie on the image of any one. Two conics meet in four points; a line and a conic meet in two; so intersecting the imaged circle with the horizon hands back exactly the pair, with no fitting and no choice.

The intersection is complex in the ordinary case, and this is where a routine can quietly throw the answer away. A circle wholly in front of the camera has an image that does not reach the horizon, so the quadratic’s discriminant is negative — here it is −1.3×102-1.3\times10^2 — and a solver returning “no intersection” would be discarding exactly the pair being looked for. The two points are there; they are a conjugate pair.

What the drawn angle is doing meanwhile

The figure prints two numbers and the second one is a distraction worth naming.

The protractor’s answer on the paper — 80.4° for a world right angle in the picture drawn here — is not an approximation to anything. It is a perfectly good measurement of a perfectly real angle: the angle between two lines in the picture plane. It is simply an angle in a different plane from the one being asked about, and no amount of care makes it converge to 90°.

Sliding the second line through the whole range makes the point better than arguing it. As the world angle runs from 20° to 160°, the drawn angle runs from about 5° to about 175°, tracking it monotonically and matching it nowhere. Two monotone functions of the same variable, and only one of them is the answer.

And changing the camera’s focal length does not move the drawn angle at all. A longer lens from the same place scales the picture about the principal point, and a uniform scaling preserves every angle in it — which is the distinction this site has drawn since its first phase between changing the lens and changing where the eye is. The drawn angle is a fact about the camera’s position, not about its lens.

What this changes about “a projection destroys angle”

Three things, and the third is the one worth carrying.

The angle is not gone; it is unlabelled. The picture contains everything needed to compute a world angle. What it does not contain is a marker saying where the two points are, and every method of recovering angle from a photograph — rectification, calibration, the vanishing-line construction — is a method of finding them.

Rectification is a detour. The usual route to an angle is to rectify the plane and then measure with a protractor on the rectified copy. That works and it does more than necessary: rectification produces a whole new picture in order to read one number. The cross-ratio reads the number off the original, and nothing is warped, resampled or redrawn.

The two points are the metric upgrade. The stratification rung buys the affine level with the vanishing line and the metric level with “one more fact”. The one more fact is these two points, and they cost four numbers — two complex coordinates constrained to lie on a known line, which is two real numbers each. That is exactly the gap between the affine group’s six degrees of freedom and the similarity group’s four… measured in the picture, where the projectivity has eight.

Projective, affine, metric — what each stage buysThe photograph fixes the plane only up to a projectivity: the midpoint of a receding side lands 0.3970 of the way along. Supplying the plane's vanishing line buys the midpoint back exactly and nothing else. Supplying the image of one circle buys the last three numbers, at which point the right angle is 90.000° and two equal sides measure 1.000000. The cross-ratio is 1.333333 in all three, because it was never lost.projectiveaffinemetricmidpointtwo equal sidesa right anglecross-ratioprojective———1.333333333affine0.500000——1.333333333metric0.5000001.00000090.000°1.333333333— means the stage does not determine it at allcross-ratio 1.333333 throughout
Fig. 4 The ladder this sits on. The photograph puts a midpoint at 0.397025 of the way along; the vanishing line buys it back at 0.500000; the image of one circle buys the right angle at 90.000000° and two equal crosswise lengths at 1.000000. The cross-ratio is 1.333333333 at all three stages, because it was never lost.

The residue is the check

There is a quantity in the computation that has to be zero and is not asserted by construction, and it is the reason the implementation can be trusted.

The logarithm of the cross-ratio is complex. Its imaginary part is twice the angle. Its real part must vanish for two real lines, because the cross-ratio has modulus one — it is e−2iΔαe^{-2i\Delta\alpha}, a point on the unit circle.

A sign error in the pencil basis, a swapped I\mathbf{I} and J\mathbf{J}, or a mis-normalised line all produce a plausible angle with a residue attached. So the residue is computed and returned beside the angle rather than discarded, and both are asserted: the angle against the truth and the residue against zero.

In the world’s own coordinates the residue is 1.1×10−161.1\times10^{-16}. In the picture it is zero to the last bit. A figure that reported a good angle with a residue of 0.30.3 would be reporting an arithmetic accident.

What the formula needs and does not need

Worth listing, because the short list is the point.

It needs the two lines, as lines in the picture — two points on each is enough. It needs the two imaged circular points. That is all.

It does not need the camera. It does not need the focal length, the principal point, the viewing distance, or where the plane is. It does not need the plane rectified, resampled or even fully visible. It does not need the picture’s scale, and it would return the same answer from a photograph of the photograph.

That last one is the sharpest statement of what has happened. A projection of a projection is a projection, so re-photographing the picture composes another projectivity onto it — and a cross-ratio is exactly the quantity that composition leaves alone. An angle read this way survives any number of re-photographings, which no protractor measurement does.

A print, photographed again — flat and rolledFour marks fix a homography; the other 16 are predicted by it. On a flat print they land where it says to 1e-13 px. Rolled to 1/R = 0.90 per metre the same four predict the same 16 to 30.5 px, because a composition of projections is a projection only if the middle surface is a plane.an anchorcorrect from 19 cm, at 160 mm wideflat 1e-13 px · rolled 30.5 px
Fig. 5 The composition, from this field’s own third rung. A picture of a picture is a picture, so anything read off it by a cross-ratio is read off the original too.
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. 6 The invariant itself, in its original form. Four points on a line; length, ratio of lengths and midpoint all destroyed, and one number carried through.

That is the invariant in the form it is usually first met, on four points of a line. The formula this essay actually uses needs it in the other form, on four lines through a point, and the two are the same statement seen from either side — which is worth drawing rather than asserting, because the step from points to lines is where the angle comes in.

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. Joined to a vertex off their line, the four points become four lines whose own cross-ratio is the same number — and two further transversals cut those lines in four points that carry it again, which is why any picture of the four rays gives the same answer.horizonABCDany vertexon the groundin the picturelength AB1.00011.3930ratio AB:CD0.56670.6837cross-ratio1.31681.3168correct from 26 cm, at 160 mm wide34° across
Fig. 7 And its dual, which is what the formula actually uses: four concurrent lines carry one cross-ratio, measurable on any transversal. Two of the four lines Laguerre’s formula needs run to points that are not in the picture and not real.

Where it stops

Two limits, both structural.

It is a statement about one plane. The circular points belong to a plane, so their images belong to that plane’s image, and an angle between two lines lying in different world planes is not what the formula returns. Every plane in a picture has its own pair, on its own vanishing line.

Finding the pair costs something. The formula is free once the pair is known and the pair is not given. An imaged circle supplies it; so does a pair of known-perpendicular directions, or a known aspect ratio, or a calibrated camera — and that last route is the strongest, because a calibrated camera supplies the pair for every plane in the picture at once, from one conic and no circles at all.

The same shape of result, three fields away

It is worth putting this beside two other results on this site that have the same form, because the form is the interesting part.

A height comes out of a photograph from a cross-ratio along a vertical, given the horizon and one reference length. The lamp comes out of a picture from three posts, their shadow tips and the camera’s own horizon. And here an angle comes out of a picture from a cross-ratio against two points that are not in it.

In all three the recovered quantity is one a projection is said to destroy, the recovery is a cross-ratio, and the thing that has to be supplied is a reference — a length, a horizon, a pair of points. That is what “the cross-ratio is the only surviving quantity” means operationally: everything recoverable is recoverable as a cross-ratio, and the work is always in finding the extra points to take it against.

The three references are not equally cheap. A length has to be measured in the world. A horizon can be constructed from two pairs of parallel lines in the picture. The circular points need a circle, or a calibration, or a known angle — and one of those three, being a calibration, supplies them for every plane at once.

The short version

An angle is a cross-ratio: of two lines with the two lines from their meeting point to the circular points, with the logarithm halved and its imaginary part taken. In the plane’s own coordinates that returns the protractor’s answer to 1.4e-14 degrees over forty-two pairs.

The construction is projective, so it survives being photographed. Locating the images of the two points in a picture — where the horizon meets the image of any circle in the plane — lets the world’s angles be read straight off the photograph, with no rectification and no camera.

So a projection does not destroy angle the way it destroys length. It destroys the labels, and the two points are what a picture is missing.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Circular pointsConicCross-ratioDemonstrationHomogeneous coordinatesHorizonLaguerre formulaline at infinityMetric rectificationpoint at infinityProjective dualityProjective invariantProjective stratificationRectificationSimilarity