Light and mirrors

A light far enough away

The evidence in a photograph that its light is in the room rather than at infinity is one number — how far below the horizon the shadow lines put the light's foot. It falls off as one over the distance, from 211 px at 4 m to 10.8 px at 266 m, while the recovered height stays exact to 5e-13 of itself. What fails first is not the arithmetic; it is the evidence, and one pixel of error costs 0.21 mm of height at the near end and 0.07 m at the far one.

Worth reading first: The lamp, out of the picture · Where shadows vanish.

The lamp comes out of the picture by intersecting drawn lines: the lines from each post’s top through its shadow tip meet at the image of the light, and the lines from each post’s foot through the same tip meet at the image of the light’s foot. Two points, one vertical apart, and the ground plane’s own scale turns them into a position.

The construction has a test built into it that separates a lamp from the sun. A lamp’s foot is below the horizon; the sun’s is on it. So the question this essay asks is what happens in between, because that is where every photograph of a scene lit by a distant lamp actually sits.

The lamp walked out toward the sunThe evidence in a picture that its light is in the room and not at infinity is one number: how far below the horizon the shadow lines put the light's foot. It falls off as one over the distance — 211 px at 4 m, 10.8 px at 266 m — while the recovered height stays exact to 5e-13 of itself. What breaks is not the arithmetic but the evidence: one pixel of error moves the recovered height by 0.21 mm at the near end and 0.07 m at the far one — a factor of 321.05010015020011.502log₁₀ of the lamp's distance (m)pixels the recovered foot sits below the horizonthe sun: on the horizonthe recovered height stays exactwhat falls off is the evidence that the light is finite
Fig. 1 The lamp walked from four metres out to two hundred and sixty. The recovered foot’s distance below the horizon falls as one over the distance — 211 px to 10.8 px — while the recovered height stays exact to 5e-13 of itself. What is running out is the evidence, not the arithmetic.

Two quantities that behave completely differently

The sweep separates two things that a single measurement would blur together, and the separation is the point of doing it as a sweep.

The answer stays exact. At every distance in the sweep the recovered height matches the lamp’s actual height to 5e-13 of itself. There is no distance at which the construction starts being approximately right; it is exactly right, at every step, on exact input.

The evidence goes away. The foot’s distance below the horizon — the whole of what distinguishes a lamp from the sun in a picture — falls as 1/D1/D. The last three doublings give ratios of 1.80, 1.89 and 1.94, converging on 2, which is the law with the camera’s own height still contributing at the near end.

So the failure that eventually arrives is not a failure of the method. It is that the input stops containing the distinction: two shadow lines a fraction of a pixel from parallel are, to any real measurement, parallel.

What a pixel costs, against distance

The way to put a number on “the evidence goes away” is to perturb the input by the smallest amount a real measurement could resolve and see what the answer does.

One pixel of error in the recovered image of the light moves the recovered height by 0.21 mm at four metres and 0.07 m at two hundred and sixty — a factor of 321 across the sweep, growing without bound beyond it.

That is the shape every recovery on this site has when it approaches a degeneracy, and it is worth naming as a pattern rather than as a fact about lamps.

In each case the exact arithmetic is exact everywhere and the conditioning is what runs out. The pattern is general enough to be a reading habit: a recovery’s reach is set by its conditioning and not by its correctness.

What the angle between the two rays is worthThe recovery is exact at every one of these — 3e-14 m — and that is not the question. What changes is the price of a pixel: 5.9 mm of depth per pixel with the lamp 39° off the camera's ray, and 1 mm at 15.4°. A lamp beside the lens gives a shadow under the object and a measurement worth nothing.02.5057.5020253035angle between the camera's ray and the lamp's (°)millimetres of depth per pixel of error in the shadowexact at every anglethe cost of one pixel is what moves
Fig. 2 The same shape in the neighbouring measurement. The recovery is exact at every angle — 3e-14 m — and what changes is the price of a pixel, from 5.9 mm at 39° between the rays to 1 mm at 15.4°. An exact method with no precision left is still exact.

Why the foot below the horizon is the evidence

The quantity the sweep follows deserves an explanation, because it looks like an incidental by-product of the construction and is in fact the only thing carrying the information.

The light’s foot is a point of the ground plane. Every point of the ground plane images below the horizon, and how far below is a measurement of how far away it is: for a camera at eye height hh looking at a ground point dd away, the image sits about fh/df h / d below the horizon. The horizon itself is the limit of that as dd grows — which is what the horizon is, the image of the ground’s points at infinity.

So “the foot is 211 px below the horizon” is a statement that the foot is a particular distance away, and “10.8 px” is a statement that it is much further. The recovery is not reading the lamp’s height off some separate quantity: it is locating the foot on the ground and then reading the height as a cross-ratio up the vertical through it, which is the single-view height measurement pointed at a light instead of at a person.

That identification explains the 1/D1/D law without any new argument. The evidence is a distance measurement made on a ground plane, and every distance measurement on a ground plane degrades as 1/d1/d, because that is how the perspective divide converts depth into pixels.

Two objects, and what a third buys

The construction needs two shadow-and-object pairs to give a point, and everything beyond that is redundancy — which is worth having for a reason that has nothing to do with averaging.

Two pairs determine the answer. Two lines meet at the light’s image; two more at the foot’s. There is nothing left over, so the answer fits perfectly whatever it is, and no residual is available.

A third pair supplies a residual. With three posts, the third line either passes through the intersection the first two found or it does not, and the distance between them in pixels is a number that could be large. It is what would catch a scene lit by two lamps, or a shadow tip misidentified, or a post that is not vertical.

And two pairs leave one residual after all, which the construction does not compute. The lamp’s image and its foot’s image are the images of two points on a vertical world line, so they must be collinear with the vertical vanishing point — a condition the two intersections were found without using, and which the posts themselves supply the third point for. So the honest ladder is one rung longer than “two determines, three tests”: two determines and tests once, three tests three times.

There is a symmetry in that pair worth noticing before the arithmetic. Both improvements act on the same quantity — the foot’s offset in pixels — so a reader can trade them freely: doubling the focal length and doubling the camera’s height are interchangeable, and either can substitute for halving the marking error. That is unusual, and it comes from the offset being a single product fe/dfe/d rather than a combination of independent terms.

The precision, which is the offset itself

The two numbers the essay quotes for the foot’s position — 211 pixels below the horizon in one arrangement and 10.8 in another — are the precision as well as the measurement, and saying so turns the 1/D1/D law into something a reader can act on.

The foot of a lamp at distance dd images fe/dfe/d pixels below the horizon, for a camera of focal length ff at eye height ee. Perturb that offset by ε\varepsilon pixels and the recovered distance moves by

δdd  =  εfe/d  =  εoffset in pixels.\frac{\delta d}{d} \;=\; \frac{\varepsilon}{fe/d} \;=\; \frac{\varepsilon}{\text{offset in pixels}}.

The relative precision of a lamp’s distance is one over its foot’s offset below the horizon, in pixels. So a foot 211 pixels down is a distance good to half a per cent per pixel of marking error, and one 10.8 pixels down is good to nine per cent — the same two numbers, read as a conditioning rather than as a position.

That also settles where the sun begins, in the only sense the question has an answer. A lamp becomes indistinguishable from one at infinity when its foot’s offset drops below the marking error, that is at

d  ≳  f eε,d \;\gtrsim\; \frac{f\,e}{\varepsilon},

which for an ordinary camera — ff around 800 pixels, an eye at 1.6 m, marks to a pixel — is over a kilometre. So in an ordinary photograph a real lamp is essentially never mistakable for the sun; what degrades long before that is the precision of its distance, which is already nine per cent per pixel at twenty metres and worse beyond.

The two statements are worth keeping apart, because the field’s usual phrasing runs them together. The sun is a limit and a lamp approaches it continuously — but the approach is a loss of precision, not a loss of detectability. A street lamp fifty metres away is detectably not the sun and its distance is known to a third; the sun is detectably at infinity because its foot lands on the horizon to within the noise. Between them lies a band where the answer is “a long way, and by how much is not sayable”, and that band is where a reader has to say so rather than quote a number.

That is the same discipline as the closest-approach residual in the depth measurement and the same as the reason the site’s round trips are run at all: an exactly-determined answer is unfalsifiable, and one extra observation is what turns a construction into a measurement.

Worth adding that a single post determines nothing at all — the light lies on a line, not at a point — and the machinery says so by returning the family rather than a member of it. A recovery that returned a position from one post would be reporting its own tie-break with a residual of zero, which is the sharpest form of a number that means nothing.

The lamp, from the shadows aloneThe two intersections are the light and the point below it. Nothing about the lamp was given to the construction — it is shown three posts, three shadow tips and the camera's own horizon — and the recovered position is 2e-12 mm from the truth. The light's foot sits 351 px below the horizon, which is what says it is a lamp and not the sun.the shadow lines meet below the horizon — a lamp in the roomhorizoncorrect from 25 cm, at 160 mm wide3 posts · foot 351 px below the horizon
Fig. 3 The recovery at a different lamp height, and the reason redundancy matters: nothing about the lamp is given, the answer lands 2e-12 mm from the truth, and the third post is what would have said so if it had not.

Why the sun is a limit and not a special case

The site’s habit is to treat a centre at infinity as a value of a parameter rather than as a different subject, and the light field is where that habit pays twice.

The sun is a lamp at infinity, and its shadows are therefore a parallel projection of the occluder. Everything that holds for a lamp holds for the sun with the centre moved, in exactly the way a parallel drawing is a photograph from infinitely far away.

Two consequences, both measurable and both worth stating because they are the practical content:

Sunlit shadows are the same shape wherever the object stands. A parallel projection is translation invariant, so moving an object across a sunlit courtyard translates its shadow and does nothing else. Under a lamp the shadow changes size and shape as the object moves, and that change is the whole of what makes a lamp recoverable.

Sunlit shadows converge in the picture and are parallel in the world. The convergence point is on the horizon, and it is the image of the sun’s direction — which is to say the vanishing point of a family of parallel lines, exactly as the site’s foundations field describes.

Six posts in sunlight from 34°The shadows are parallel in the world, so in the picture they meet at one point on the horizon — found from the drawn shadows to 3e-13 px.horizonshadows meet at x = -58, off the frameon the horizon, as it must be
Fig. 4 The sun’s shadows, meeting on the horizon at a point found from the drawn lines to 3e-13 px. That meeting point is the image of a direction rather than of a place, which is what “at infinity” means when it is drawn.

What a sun determines, and what a lamp determines

The counting is the cleanest statement of the difference, and it explains why the sun is the easier case to recover despite carrying less information.

A lamp is three numbers — a position. Recovering it needs two independent shadow-and-object pairs: two lines meeting at the light’s image, two more meeting at its foot’s image.

The sun is two numbers — a direction, an altitude and an azimuth. One post and its shadow determine the direction outright, since the ray from the post’s top through the shadow tip is the sun’s direction.

So a sunlit photograph gives up its lighting geometry from a single object, and a lamp-lit one needs two. The lamp carries one more number and demands one more piece of evidence, which is the usual accounting and is not a surprise.

What is a surprise, and is this essay’s own measurement, is the third case: a distant lamp is worse than either. It is three numbers, so it demands two objects; and its evidence for the third number has fallen to a fraction of a pixel, so the number it returns is noise. The regime between “clearly a lamp” and “effectively the sun” is where a recovery is least trustworthy, and it is a wide regime — the 1/D1/D falloff means the evidence halves for every doubling of the distance and never quite reaches zero.

The same construction, in sunlightThe lines through top and shadow tip are parallel in space, so their images meet at a vanishing point — and the lines through foot and tip meet ON the horizon, 5e-12 px off it. A light whose foot is on the horizon is a light at infinity.the shadow lines meet on the horizon — a light at infinityhorizoncorrect from 25 cm, at 160 mm wide3 posts · foot 5e-12 px off the horizon
Fig. 5 The construction fed the sun. The same code, the same drawn lines, and the intersection lands on the horizon rather than below it — a light at infinity is one of the answers the method can return rather than a case it has to be told about.

The refusal, and where it belongs

There is a configuration the recovery must refuse rather than answer, and it is not the far end of the sweep.

A lamp behind the camera has its foot behind the camera too, and the image of a point behind the eye lands above the horizon rather than below it. Feed that to a routine that assumes a foot below the horizon and it returns a height with a sign error and no complaint.

The machinery refuses it, and the refusal is a statement rather than a guard: a foot above the horizon is the picture saying the light is behind the camera, which is true and is not a height.

That distinction — an answer the method can return, against a configuration it must decline — is the discipline the breadth-02 gate was written to enforce across this site, and it applies here in both directions. The sun is an answer. A light behind the camera is a refusal. A distant lamp is an answer with a stated precision, and the precision is the thing that has to be quoted with it.

The test that survives the conditioning

There is one thing the picture keeps saying clearly long after it has stopped saying where the light is, and it is the thing most often actually wanted.

Do two objects share a light? That question is answered by consistency rather than by position. Each object with a visible shadow contributes a line through the light’s image; if the lines meet at a common point, one light is consistent with all of them, and if they do not, no single light is. The residual is in pixels, and it does not require the intersection to be well conditioned — two nearly-parallel lines still either cross a third one at a common place or they do not.

That is why the conditioning collapse above does not make a distant lamp undetectable. It makes its distance undetectable while leaving the shared-light test intact: a sunlit photograph and a photograph lit by a lamp fifty metres away both pass the consistency test, and neither can be told from the other, and an object inserted into either with its shadow drawn at the wrong angle fails both.

The practical form of this is the standard check on a composited image. Take every object with a visible shadow, draw the line from its top through its shadow tip, and see whether the family has a common point — anywhere, including at infinity. A composite assembled from two photographs lit differently produces two families that do not share one, and the discrepancy is in whole degrees rather than in pixels.

What the conditioning does affect is what can be said next. “These shadows are consistent with one light” is robust. “That light was 40 m away and 12 m up” is a claim whose error bars, on a real photograph with pixel-level line fitting, run from a few metres to the sun.

Six posts in sunlight from 28°The shadows are parallel in the world, so in the picture they meet at one point on the horizon — found from the drawn shadows to 6e-13 px.horizonshadows meet herethe shadows' vanishing point is in frameon the horizon, as it must be
Fig. 6 The consistency test at a different sun bearing. What is being checked is whether one point serves all the shadow lines — a question that stays answerable at any distance, including the one where the point has gone to the horizon.

Reading a photograph after this

Three practical residues, which are also three tests a reader can apply to a picture.

Look at where the shadow lines meet. Below the horizon: a lamp, and its height is recoverable. On the horizon: the sun, or a lamp far enough away to be indistinguishable from it. Above the horizon: the light is behind the camera.

Ask how far below. The distance below the horizon in pixels is the evidence, and it converts to a distance: at this camera, 211 px means about four metres and 10.8 px means about two hundred and sixty. A gap of a few pixels is a lamp somewhere between fifty metres and the sun, and the picture does not say which.

And do not read a converging pair of shadows as a lamp without measuring. Two shadow lines in a photograph are never exactly parallel, because measurement is never exact — so every sunlit photograph, read carelessly, contains a lamp at some large distance. That is the failure this essay’s sweep is a defence against, and the defence is quoting the precision beside the answer.

Shadow length against the sun's elevationA 1 m post casts a 1 m shadow at 45° and a 5.7 m shadow at 10°. The curve is a cotangent and it has no upper bound.02420406080elevation of the sun (degrees)length of the shadow of a 1 m post (m)45° — shadow equals heightcot of the elevationunbounded as the sun sets
Fig. 7 The other quantity a distant light makes uninformative: how a shadow’s length varies with the light’s elevation. Near the horizontal it runs away, which is the same conditioning collapse read on the length rather than on the intersection.

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 projectionConditioningerror propagationHorizoninstrument limitLight recoverypoint at infinityshadow vanishing pointsingle-view metrologyVanishing point