Light and mirrors

The lamp comes out in rays and not in plan

One drawing of three posts and their shadows yields two points, and a curved floor treats them completely differently. The lines through each post's top and its shadow's tip meet at the lamp's image to a ten-thousandth of a pixel at every curvature, because a top and a tip are two points of one real ray. The lines through each foot and the same tips meet 113 pixels from the lamp's foot — and the lamp placed from an exact point and a wrong one lands 1.3 metres away.

Worth reading first: The lamp, out of the picture · The floor that is not a plane · Where shadows vanish.

The lamp out of the picture runs the round trip that every drawing manual’s shadow construction implies and none of them measures. Place a lamp, draw the posts and their shadows, forget the lamp, and get it back out of the drawn lines alone.

The construction has two halves and the essay treats them as one thing, because on a flat floor they are one thing.

They are not, and a floor that is not flat separates them completely.

The lamp's image comes out of the drawing; its foot does notTwo points are found in the same drawing. The lamp's own image, from the lines through each post's top and its shadow's tip, is exact at every curvature — 2e-12 px — because a top and a tip are two points on one real ray. The foot's image, from the lines through each post's foot and the same tip, walks away smoothly, and the lamp placed from an exact point and a wrong one ends up 133 cm from where it is.05010000.0500.1000.1500.200how strongly the floor disheshow far the recovered foot is from the lamp's (px)the foot, found in the planthe lamp, found in rays — exactthree posts on a dished floor, one drawing133 cm of lamp at k = 0.22
Fig. 1 The two points the construction finds, against how strongly the floor dishes. One of them is exact at every curvature and the other walks away smoothly, never announcing itself.

The two halves

The recovery draws two families of lines in the picture.

Through each post’s top and its shadow’s tip. Those two points are on one real ray of the lamp — the ray that grazed the top and ended at the tip — so their images are on the image of that ray, and every such image line passes through the image of the lamp. Two of them meet there; a third is a consistency check.

Through each post’s foot and the same tip. On a flat floor those two points are both on the ground, so the line joining them is the image of a ground line, and the ground lines all pass through the lamp’s foot. Two of them meet at the image of the foot.

The lamp’s position in the room then comes from the two together — the foot fixes where on the ground it stands, and the height comes from where the lamp’s own image sits on the vertical through that foot, read as a cross-ratio against the horizon.

On a flat floor those two constructions are not two constructions. They are one drawing read twice, and every drawing manual presents them together as a single method because there is no reason to separate them. The essay that ran the round trip did the same, and the round trip passed, because the floor it was run on was a plane.

Two constructions in one drawing, and only one of them is exactThree posts on a dished floor, photographed. The lines through each top and its shadow's tip meet at the lamp's image to 1e-13 px, because those are four points of two real rays. The lines through each foot and the same tips meet 13.3 px from the lamp's foot, because a foot on a dished floor is not on the ground plane the construction assumes.three posts on a floor dished at k = 0.021e-13 px by ray · 13.3 px in plan
Fig. 2 The drawing at the gentlest curvature in the sweep. The two constructions have already parted by thirteen pixels.

What a dished floor does to each

Dish the floor and post the same three posts on it, feet genuinely standing on the surface rather than hovering.

The first family is untouched. A post’s top and its shadow’s tip are still two points on one real ray of the lamp, whatever surface the tip landed on — the floor decided where along the ray the tip is, and a point anywhere along a ray is still on that ray. Measured across curvatures from 0 to 0.22, the recovered image of the lamp is out by between 6×10146\times10^{-14} and 2×10122\times10^{-12} pixels. That is arithmetic.

The second family is destroyed. A foot on a dished floor is not on the ground plane; nor is the tip; so the line joining their images is not the image of a ground line, and the point two of them meet at is not the lamp’s foot. At a curvature of 0.02 it is 13 pixels out; at 0.22, 113 pixels.

Two constructions in one drawing, and only one of them is exactThree posts on a dished floor, photographed. The lines through each top and its shadow's tip meet at the lamp's image to 6e-14 px, because those are four points of two real rays. The lines through each foot and the same tips meet 68.1 px from the lamp's foot, because a foot on a dished floor is not on the ground plane the construction assumes.three posts on a floor dished at k = 0.126e-14 px by ray · 68.1 px in plan
Fig. 3 The drawing itself, at a middling curvature. Both constructions are drawn on the same three posts. One meeting point is the lamp’s image to a ten-thousandth of a pixel; the other is a hundred pixels from where the lamp’s foot is.

The number that matters

An error in the picture is not the answer; the answer is where the lamp ends up in the room.

At a curvature of 0.22 the recovered lamp is 1.33 metres from the true one, and its height is wrong by 62 centimetres. That is a lamp on the wrong side of a room, recovered from a drawing in which one of the two constructions was exact to twelve decimal places.

The pairing is what makes it dangerous. A reader checking their work would find the first construction’s three lines meeting beautifully — the residual there is genuinely at the arithmetic floor, because the three rays really do meet — and would take that as evidence the drawing is sound.

It is evidence the drawing is sound. It is not evidence about the floor, and the floor is what the other half needed.

Two constructions in one drawing, and only one of them is exactThree posts on a dished floor, photographed. The lines through each top and its shadow's tip meet at the lamp's image to 2e-12 px, because those are four points of two real rays. The lines through each foot and the same tips meet 113.3 px from the lamp's foot, because a foot on a dished floor is not on the ground plane the construction assumes.three posts on a floor dished at k = 0.222e-12 px by ray · 113.3 px in plan
Fig. 4 The strongest curvature in the sweep. The ray construction is still exact and the ground construction’s meeting point has walked over a hundred pixels.

What the height error does downstream

A lamp 1.33 metres out of place is not merely a wrong answer about a lamp. Everything the field computes from a recovered lamp inherits it.

Depth from a shadow uses the lamp as the second centre of projection, so a lamp in the wrong place puts every recovered depth in the wrong place — and the errors are systematic rather than scattered, because they all come from the same displaced centre.

Un-casting a shadow runs a ray from the lamp through each mark, so a displaced lamp shears the recovered outline. The earlier rung measures this directly and finds it linear: a lamp misplaced by a hundred millimetres moves the recovered outline by millimetres. Sixty-two centimetres of height error is six times that misplacement.

So the height error is not the end of the accounting; it is the beginning of it. And every one of the downstream errors is again silent, because each of them is a perfectly consistent computation from a lamp that happens to be somewhere else.

The chain, with the factors named

The 1.33 metres is the end of a short chain and each link has a name, which makes the number usable on an arrangement other than this one.

A floor of curvature kk departs from its best-fitting plane by a sagitta of about ka2k a^{2} over a patch of half-extent aa — 0.22 m here. A post’s foot standing on it is displaced along the ground by that height divided by the tangent of the light’s elevation, the grazing factor every ground measurement in this collection pays. And the displaced foot-lines then miss their intersection by an amount the crossing geometry amplifies, which for this arrangement is about five.

lamp error    ka2  cotφ  ×  (crossing amplification).\text{lamp error} \;\approx\; k a^{2}\;\cot\varphi\;\times\;(\text{crossing amplification}).

Multiplying through gives 1.3 m from 0.22 m of sagitta, which is the measured figure — so the chain is sagitta, grazing, crossing, in that order, and the sagitta is the only link a floor controls.

Two things a reader can do with it.

Invert it for a tolerance. Holding the recovered lamp within ten centimetres needs a sagitta under about 1.7 cm over the patch the posts stand on — a floor flat to under two centimetres over a couple of metres, which is an ordinary specification for a screed and a demanding one for a pavement. That is a number to check before trusting a recovery, and it is a number about the floor rather than about the photograph.

Or invert it for the floor. The ray construction is blind to the floor and the ground construction is not, so the disagreement between the two recovered lamps is a measurement of the sagitta — divide by about six for this arrangement, or by cotφ\cot\varphi times the crossing amplification in general. A reader who runs both constructions and finds them a metre apart has not merely detected a problem; they have measured the floor’s departure from flat at about fifteen centimetres, from the picture alone.

Which turns the diagnostic from a warning into an instrument, and it is free — both constructions were already being computed, and only their difference was being discarded.

The outline, the shadow, and the outline againThe inverse is run through a lamp displaced by 0.3 mm. The recovered outline is 0.12 mm from the truth, and the error is exactly linear in the displacement — a shadow is an exact record of its occluder up to how well the light is known.the inverse is run through a lamp 0.3 mm out of placecorrect from 20 cm, at 160 mm wide0.12 mm out
Fig. 5 Un-casting with a lamp in the wrong place. The recovered outline is a sheared version of the true one, and the shear is linear in the lamp’s displacement.

What the drawing does say, and what it does not

The obvious next question is whether the drawing announces the problem, and the first draft of this essay assumed it did not. That was wrong, and the way it was wrong is the essay’s most useful result.

The lamp recovery already reports a residual, and it is not small. With three posts on a dished floor it reads 15 pixels at a curvature of 0.02 and 55 at 0.22. So the drawing does complain.

What it complains about is the trouble. The residual was written to catch a scene lit by two lamps — two lights make two families of rays that do not meet at one point, and the residual is what says so. A floor that is not flat produces exactly the same symptom. One number, two causes, and no way to tell them apart.

Splitting the residual separates the causes

The single number is the maximum over both families, and the two families behave completely differently.

Measured across four cases, with four posts and one drawing each:

  • One lamp, flat floor. Ray family 3×10133\times10^{-13} px, ground family 2×10132\times10^{-13}.
  • One lamp, dished floor at 0.12. Ray family 2×10132\times10^{-13} px, ground family 46.
  • One lamp, floor with a step. Ray family 3×10133\times10^{-13} px, ground family 143.
  • Two lamps, flat floor. Ray family 67 px, ground family 56.

So the pair reads cleanly. A large ground residual beside a zero ray residual is a floor that is not flat. Both large is a second light. And the third row is the control that makes it a diagnostic rather than a coincidence — if two lamps had left the ray family meeting, the test would be measuring the floor and calling it a light count.

Two residuals, and what each of them is a symptom ofThe lamp recovery reports the larger of two residuals. Split apart, they separate the two faults the single number conflates. One lamp leaves the ray family meeting exactly on every floor — 2e-13 px on a dish, 3e-13 px on a step — while the ground family drifts to 46 and 143 pixels. Two lamps spoil both, at 67 and 56. So a large ground residual beside a zero ray residual is a floor, and both large is a second light.the two families' residuals, in pixelsone lamp, flat floor00one lamp, dished floor045.9one lamp, floor with a step0142.6two lamps, flat floor67.056.0two lamps, dished floor73.753.7upper bar: the ray family · lower bar: the ground familyfour posts, one drawing, two constructionsa zero ray residual with a large ground one is a floor
Fig. 6 The two residuals across the four cases. The upper bar of each pair is the ray family and the lower is the ground family, and the pattern of which is large is the diagnosis.

Why nobody had looked

The split costs nothing. Both families are computed already; the recovery takes their maximum and discards which one it came from, on the same line.

That is the same shape of loss the shadow residual’s field turned out to have — a computation that produces a structured object, compresses it to a scalar, and throws away the part that answers the question. Twice in one row, from two different rungs, by the same mechanism.

There is a reason worth naming rather than a lapse. A maximum is the right summary for the question the recovery was written to answer — is this drawing consistent with one light — because for that question either family failing is a failure. It becomes the wrong summary the moment a reader asks why, and nothing in the code marks the boundary between the two questions.

The control

At zero curvature both constructions agree, to 101310^{-13} pixels and 101610^{-16} metres.

Without that, the difference between the two halves could be a difference between two solvers rather than between two geometries. With it, the divergence is the floor and nothing else, because the identical machinery on the identical drawing returns the identical answer when the floor is flat.

Two constructions in one drawing, and only one of them is exactThree posts on a dished floor, photographed. The lines through each top and its shadow's tip meet at the lamp's image to 1e-13 px, because those are four points of two real rays. The lines through each foot and the same tips meet 0.0 px from the lamp's foot, because a foot on a dished floor is not on the ground plane the construction assumes.three posts on a floor dished at k = 01e-13 px by ray · 0.0 px in plan
Fig. 7 The control. A flat floor, the same three posts, and the two constructions meeting at the same two points — which is what makes the divergence elsewhere a fact about the floor.

A step, where the same two things happen

The dish is a smooth surface and the smoothness is not the point.

On a floor with a step, the ray construction returns the lamp’s image to 101310^{-13} pixels and the ground construction is 143 pixels out, putting the lamp 1.6 metres from where it is. The mechanism is the same and does not care whether the floor is curved, creased, or shaped in any other way — all it needs is for the feet and the tips not to be coplanar.

Which is the honest general statement. The ground construction assumes the feet and the shadow tips lie in one plane, and everything above is what happens when they do not. A dished floor is one way to break that; a step is another; a room with a rug in it is a third.

What the diagnostic is worth in practice

A photograph of a room with three or four posts in it — bollards, chair legs, people standing — now yields three numbers rather than one, and the three answer different questions.

The ray family’s meeting point is the lamp’s image, exact. That is a real result about the light and it is available on any floor.

The ray family’s residual answers is there one light. Zero means one; anything else means more, or means the “lamp” is an area source large enough to matter, which the penumbra rung makes precise.

The ground family’s residual, given a zero ray residual, answers is the floor flat — and gives a number for how far from flat, in pixels, without any model of the floor’s shape at all.

That third reading is worth pausing on. It is a measurement of the floor obtained from a construction that was trying to measure the light, using data that was collected for neither, and it needs no assumption about what shape the floor might be. Fitting a curvature to a shadow needs such an assumption and reports a number for a floor that has none; this reports a departure without naming its kind.

What to do instead

Two routes, both of which the field already has.

Use the rays and get the height elsewhere. The lamp’s image is exact; what is missing is the depth along the ray from the camera through it. A single post of known height supplies it, because the post’s top and foot are a known length apart on a known vertical.

Use the lamp as a second eye. The lamp is the second eye already establishes that the lamp’s ray and the camera’s ray meet at the mark. Run that on the shadow tips and the tips come back in space with no ground plane anywhere; the lamp then follows from the rays through the tops.

Both of these are constructions in rays rather than in the plan, which is the same division the un-casting rung draws. It is beginning to look like the field’s real organising principle rather than a coincidence about two essays.

And the division predicts the rest of the row rather than merely describing it. A wire’s shadow keeps its corners on every floor because a corner is a fact about the lamp and the wire, which is a statement in rays. A floor is only ever read along the curves a shadow touched because the marks are where the rays landed, which is again a statement in rays. Four rungs, one rule.

A 3.4 m object measured from one picture, 11 m awayThe base, the horizon crossing, the top and the vertical vanishing point have a cross-ratio of 1.9101. With the eye at 1.62 m that gives 3.400 m, against a true 3.4 m. The camera is not consulted.horizon — the eye's own heightbase — 0 mhorizon crossing — 1.62 mtop — 3.40 m recoveredthe vertical vanishing point is 8586 px above this framerecovered 3.400 m · true 3.400 m1.8 cm per pixel of click error
Fig. 8 A known height read out of one picture, which is the measurement that supplies the missing depth along the lamp’s recovered ray.

Why the taught construction is the plan one

It is worth asking why every manual teaches the half that breaks, and the answer is not that the manuals are careless.

The ground construction is drawable with a straightedge on paper and nothing else. It needs no camera, no calibration, no horizon — only two posts and their shadows, and a place where two lines cross. That is a genuine virtue and it is why the construction has survived five centuries.

The ray construction needs the same straightedge and gives the lamp’s image, which is a point in the picture rather than a place in the room. Turning it into a place needs the horizon, a known length, or a second view. So the taught construction is the one that answers the question with the fewest ingredients, and it pays for that with an assumption nobody states.

That is the shape of nearly every result in the wrong field of this collection, and it is worth being fair about: the taught methods are efficient, and their assumptions were reasonable in rooms with flat floors. What has changed is that a reader can now measure the cost.

What the drawing was never told

The last thing worth saying is about information rather than geometry.

The drawing contains three posts, three shadows, and a horizon. Nothing in it says whether the floor is flat. There is no measurement a reader could make on the drawing alone that distinguishes three posts on a flat floor from three posts on a dished one with a lamp somewhere else — the two produce different drawings, certainly, but each drawing is a perfectly consistent drawing of the other arrangement.

So the recovered lamp is not wrong because the reader made an error. It is wrong because the drawing has two consistent readings and the construction silently picks one.

That is a different situation from a noisy measurement and it wants a different response. Noise is reduced by measuring more carefully. An ambiguity is resolved by measuring something else — a post of known height, a second view, a mark on the floor — and no amount of care with the original drawing substitutes for it.

Except that here, as it turns out, the drawing did contain the answer. The split residual is not a new measurement; it is two numbers the recovery already computed, kept apart instead of maximised together. So this is the rarer and happier case: not an ambiguity needing a new observation, but an observation that was being made and then averaged away.

Which is the same reason the light recovery was written with a residual in the first place — two posts meet by construction and prove nothing, and the third and fourth are what can disagree. That rung uses the residual to catch a scene lit by two lamps. It catches a floor that is not flat as well, and it can tell the two apart, and nobody had asked it to.

What links here

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

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.

centre of projectionConditioningHorizonLight recoveryModel errorPlan viewReceiving surfaceReconstructionShadow projectionVanishing point