Light and mirrors

The penumbra is the lamp's image

The soft edge of a shadow is a picture of the light, projected through the occluder's edge as through a pinhole. That gives its width without any integration — and it is why the dapples under a tree go crescent-shaped during an eclipse.

This site’s light field rests on one observation: a shadow is a projection from the lamp, using exactly the machinery the camera uses with the centre moved. A point lamp is a centre of projection; the sun is the same thing with the centre at infinity; and the two cases match the two families of drawing systems because they are the same distinction seen twice.

Real lights are not points. This essay is what happens to the observation when the centre is a small region rather than a place, and the answer turns out to be the same machine used once more, with the roles of the source and the object exchanged.

A 35 cm source, an edge, and the band betweenThe penumbra is 17.5 cm wide by the projection — the source's width times the receiver-to-occluder distance over the source-to-occluder distance — and 17.4 cm by counting how much of the source each point can see. The two routes share no arithmetic.source, 35 cmthe occluder's edgefraction of the source visiblepenumbra 17.5 cmprojection: 17.50 cmsampled: 17.41 cm
Fig. 1 A source, an occluding edge, and the band between full light and full shadow. The penumbra’s width comes out of a projection — 17.5 cm — and out of counting how much of the source each point on the receiver can see — 17.4 cm. The two routes share no arithmetic.

The reading that makes it easy

An area light is a family of centres of projection, and the obvious way to compute what it does is to integrate: for each point of the source, cast the shadow, and add up the light.

That works and it is unnecessary. Turn the picture round.

Stand at a point on the receiving surface, inside the soft band, and look up. What is there? The source, partly covered by the occluder. Move outward and more of the source is visible; move inward and less is. The full shadow is where none of the source is visible and the full light is where all of it is.

So the brightness across the penumbra is the fraction of the source visible from each point, which means the penumbra is an image of the source, projected through the occluder’s edge. The occluder’s edge is playing the part of a pinhole, and the source is playing the part of the object.

That gives the width in one line. With the source at distance aa from the occluder and the receiver at distance bb beyond it, the source’s image is magnified by b/ab/a, so

penumbra=sba\text{penumbra} = s\cdot\frac{b}{a}

for a source of width ss. No integration anywhere.

Two routes that share nothing

The figure computes it both ways, because a formula this short deserves to be checked against something that does not resemble it.

Route one is the projection above: one multiplication and one division.

Route two is a sampled visibility count. For each point on the receiving plane, walk four hundred points across the source, ask for each whether the ray from it to the receiving point clears the occluder’s edge, and report the fraction. Then find the two ends of the band by bisecting on that fraction.

They agree to well within a per cent, and the difference is the sampling grain of the second route rather than anything geometric. The second route knows nothing about projections; it is a visibility count. That is what makes the agreement a check rather than a restatement.

The lit-fraction profile is drawn above the receiver in the figure, and its shape is worth a glance: it is linear across the band for a uniform strip source, because the fraction of a strip covered by a straight edge is linear in the edge’s position. A circular source would give the profile a curve, which is why the penumbra of a real shadow looks softer at its ends than in its middle.

What decides how soft a shadow is

The formula says the penumbra’s width is the source’s width times the distance ratio, and the two levers behave quite differently.

Move the occluder toward the source and aa shrinks while bb grows, so the penumbra grows quickly — and in the limit, when the object touches the light, its shadow is all penumbra and there is no shadow at all.

Move the occluder toward the receiver and bb shrinks, so the penumbra shrinks toward zero. That is why a hand pressed against a wall casts a sharp shadow and the same hand held away from it casts a soft one, and it is the single most familiar demonstration of this arithmetic that exists.

And a larger source is proportionally softer. Double the softbox and double the penumbra, everything else held.

None of that is surprising and all of it falls out of one multiplication. What is worth noticing is that the shape of the source matters too, not only its width — the penumbra is its image, so a rectangular source gives a rectangular smear and a ring-shaped source gives a shadow with a bright line down the middle of its own soft edge. Photographers know this as the character of a light; it is a projection.

A box and its shadow, both projections from a pointThe rays from the lamp to the corners are the same construction as the rays from the eye to the corners — one operation, two centres.correct from 26 cm, at 160 mm wide34° across
Fig. 2 The point-source case this essay generalises. Every ray here comes from one place; give that place a width and each of these lines becomes a narrow fan, and the shadow’s edge becomes the band the figure above measures.

The umbra, and when it disappears

There is a second question the same picture answers: is there a fully dark region at all?

The umbra is where none of the source is visible, and whether such a region exists depends on whether the occluder is big enough to cover the source from somewhere on the receiver. For an occluder of width ww and a source of width ss, the umbra vanishes once the geometry magnifies the source’s image past the occluder’s own shadow — which for a half-plane edge never happens, and for a finite object happens at a computable distance.

Beyond it, the object casts no full shadow anywhere: only a smeared darkening that gets fainter with distance. A telegraph wire against an overcast sky casts nothing visible on the ground, and the reason is not that the light is dim; it is that the sky is an enormous source and the wire’s umbra ended a few centimetres below it.

Softness as a measurement

Turn the formula round and it becomes an instrument, which is the shape this site prefers its results in.

A photograph of a shadow carries the penumbra’s width. If the distances aa and bb are known — the occluder’s height above the ground and the light’s height above the occluder — then s=penumbra×a/bs = \text{penumbra} \times a/b gives the source’s size, from the shadow alone.

That is a genuine single-view measurement of something that is not in the picture. The lamp may be out of frame entirely; the shadow’s edge still reports how big it was.

It also runs the other way. If the source’s size is known — the sun’s, say, or a window’s — then the ratio b/ab/a falls out, which fixes the occluder’s height above the ground given the light’s height, or vice versa. A shadow’s softness is a range-finder.

Neither of those is exotic and both are used in forensic reconstruction from photographs, alongside the height from a cross-ratio and the shadow’s vanishing point. The penumbra is one more quantity in a picture that most readers discard as blur.

The limit on it is the one every soft measurement has: locating the two ends of a gradual band is harder than locating a hard edge, and the uncertainty in each end is a fraction of the band’s own width. So the measurement is good to perhaps ten or twenty per cent, which is enough to tell a window from a bare bulb and not enough to tell one window from another.

The eclipse, and the dapples

Now the case that makes this essay worth having, because it is a piece of arithmetic almost nobody does and it explains something everybody has seen.

Sunlight through a gap in a leaf canopy makes a patch of light on the ground. The patch is roughly circular whatever shape the gap is, which is odd on reflection, and during a partial solar eclipse every one of them becomes a crescent at once.

Both facts are the same projection. The gap is a pinhole; the sun is the object; the ground is the screen. The patch is the sum of the gap’s own shape and the sun’s image, and which one dominates is decided by one ratio.

A 5 mm gap in a canopy, at various heightsThe patch is the hole's shape near the hole and the sun's shape far from it, and the crossover — where it is half of each — is the hole's width over the sun's angular width: 0.54 m. Above that, every gap in the canopy is a pinhole camera imaging the sun, which is why they all go crescent-shaped together during an eclipse.00.2500.5000.7500246distance from the hole to the ground (m)how much of the patch of light is an image of the suncrossover at 0.54 mthe sun subtends 9.30 mradpatch 61 mm wide at 6 m
Fig. 3 The crossover, for a 5 mm gap. Below about half a metre the patch is the gap’s shape; above it, the sun’s. The crossover is the hole’s width divided by the sun’s angular width.

The sun subtends 9.30 milliradians — about half a degree. A gap of width ww at height bb above the ground projects the sun’s image at width bαb\alpha, and the patch is roughly w+bαw + b\alpha across. The two contributions are equal at

b=wαb = \frac{w}{\alpha}

which for a 5 mm gap is 0.54 m.

So: a gap 5 mm across, more than about half a metre above the ground, is imaging the sun rather than showing its own shape. Canopies are several metres up. Every dapple under a tree is a photograph of the sun, taken through a pinhole made of leaves, and they are round because the sun is round.

During a partial eclipse the sun is not round, and every one of them changes shape together — which looks uncanny and is the most direct demonstration of pinhole imaging available without equipment.

A 8 cm source, an edge, and the band betweenThe penumbra is 4.0 cm wide by the projection — the source's width times the receiver-to-occluder distance over the source-to-occluder distance — and 4.0 cm by counting how much of the source each point can see. The two routes share no arithmetic.source, 8 cmthe occluder's edgefraction of the source visiblepenumbra 4.0 cmprojection: 4.00 cmsampled: 3.98 cm
Fig. 4 A source a fifth as wide. The band narrows in exact proportion, because the penumbra is the source’s image and an image scales with its object.

The same machine, a third time

It is worth naming what has just happened, because it is this site’s central thread.

A shadow is a projection from the lamp: the centre moves from the eye to the light, and the picture plane becomes the ground.

A reflection is the view from a camera on the far side of the mirror: the centre moves through the mirror plane, and the handedness reverses.

And a penumbra is a projection of the source, with the occluder’s edge as the centre and the receiver as the picture plane. The object and the light have exchanged roles.

Three phenomena usually taught as three recipes — shadow construction, reflection construction, soft-shadow rendering — are one operation with the centre moved and, in the third case, with the cast and the caster swapped. That the third one required swapping them is the new part, and it is the reason the penumbra is easy to compute the moment it is set up the right way round and awkward the moment it is not.

Why the pinhole works at all

The dapple argument depends on the gap acting as a pinhole camera, and it is worth spelling out why a ragged hole between leaves does anything so orderly.

A pinhole camera forms an image because each point of the object sends light through the hole in one narrow bundle, and the bundle lands in one place on the screen. The image of a point is therefore a small patch the shape of the hole, magnified by b/ab/a — and the whole image is the object convolved with that patch.

So there are two length scales: the object’s image, of width bαb\alpha, and the patch, of width ww. Whichever is larger dominates, and their ratio is the crossover this essay computes. Far enough away, the patch is negligible against the image and the picture is sharp; close in, the image is negligible against the patch and the picture is a picture of the hole.

Which explains the shape of the dapples completely. The gap between leaves is ragged and the patch it makes is ragged, but at four metres a 5 mm gap’s patch is 5 mm against a 37 mm image of the sun, so the raggedness is a blur on a disc and the disc wins.

It also explains why the dapples are dim: the light through the hole is spread over an area (bα/w)2(b\alpha/w)^2 times larger than the hole, so the brightness falls as the square of the distance from the canopy. Everybody has noticed that the light under a tree is soft and nobody usually connects it to the same ratio.

There is a third scale in a real pinhole camera — diffraction — which sets the optimum hole size and has no place on this site, because it is not geometry. It is mentioned here only so that a reader who knows it is not left wondering whether it was overlooked.

The occluder’s edge as a centre of projection

One more way to see the same thing, because it makes the family resemblance exact.

A shadow from a point lamp is a projection with the lamp as centre and the ground as picture plane; the object is what gets projected. A penumbra is a projection with the occluder’s edge as centre and the ground as picture plane; the source is what gets projected.

So the three quantities have swapped roles rather than changed kind. What was the centre is now the object; what was the object is now the centre; the picture plane is where it was. And because a projection through a centre magnifies by the ratio of the two distances, the penumbra’s width follows immediately from the same formula the shadow’s length follows from.

The reason the swap is legitimate is that the geometry of a shadow does not distinguish between the light and the thing blocking it. Both are just sets of points, and the shadow is the region a ray from one cannot reach because the other is in the way. Which of them is called the source is a physical fact and not a geometric one.

That symmetry is worth carrying because it predicts things. A large source and a small occluder give a penumbra dominated by the source’s image; a small source and a large occluder give a sharp shadow of the occluder. The crossover between the two regimes is exactly the crossover the dapples have, and it is the same ratio, because it is the same projection with the labels exchanged.

Where the sharp-shadow figures stand

Every other figure in this field draws a shadow with a hard edge, and it is fair to ask what those figures are now claiming.

They are claiming the point-source limit, which is the s0s \to 0 case of this essay, and they are exactly right in it. Nothing about the shadows of parallel lines meeting at a vanishing point on the horizon changes when the source has a width: the vanishing point is a statement about directions, and the penumbra is a smear about the sharp shadow rather than a displacement of it.

That is worth stating because the intuition could go either way. A soft shadow might have been a shifted shadow, in which case every construction in the field would need a correction. It is not: the penumbra is centred on the point-source shadow, so all the constructions survive and gain an error bar.

The one thing that does change is measurability. A shadow with a 17 cm penumbra has an edge that can only be located to within 17 cm, so reading a light’s position out of a photograph of a shadow is limited by the softness in exactly the way a sensitivity analysis would predict — and the softness is computable from the same picture, because the penumbra’s width reports the source’s size.

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.024620406080elevation 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. 5 The point-source field’s own curve, for scale. Everything in this essay is a smear about the sharp shadow this figure computes — centred on it, never displacing it.

Two lights, and why the shadows do not simply add

A last piece of arithmetic, because it is the case every interior actually presents.

Two separate lamps cast two shadows, and the region reached by neither is dark, the region reached by one is half-lit, and the region reached by both is fully lit. That much is obvious and it is not the same problem as an area light, even though the picture on the receiver looks similar.

The difference is in what the region boundaries are. With two point lamps there are two sharp shadows, each with a hard edge, and the overlaps produce steps rather than a gradient. With one area light there is one smooth ramp. A photograph of the two cases distinguishes them immediately: steps mean discrete sources, a ramp means an extended one.

Give each of the two lamps a width and the two effects compose — two ramps, overlapping — and the resulting profile is the sum of two source images through the same occluding edge. Which is the useful general statement: the brightness across a shadow’s edge is the image of the whole sky, occluded, and every source in the room contributes its own image to that sum.

That is why an overcast day produces almost no shadow edge at all. The source is the entire sky, its angular width is 180°, and the penumbra of anything more than a few centimetres from the ground is wider than the object. There is no edge left to see, and the flat light everyone recognises is the geometric consequence of a source with no shape.

It is also why a single small window in an otherwise dark room produces such distinctive shadows. The source is a rectangle of a definite angular size, and every shadow edge in the room is a picture of that rectangle — which is exactly what a photographer means by the quality of window light, arrived at from a projection.

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. 6 The field’s point-source constructions, which this essay leaves standing. A vanishing point is a statement about directions, and a penumbra is a smear about the sharp shadow rather than a displacement of it.
A 2 mm gap in a canopy, at various heightsThe patch is the hole's shape near the hole and the sun's shape far from it, and the crossover — where it is half of each — is the hole's width over the sun's angular width: 0.22 m. Above that, every gap in the canopy is a pinhole camera imaging the sun, which is why they all go crescent-shaped together during an eclipse.00.2500.5000.75010246distance from the hole to the ground (m)how much of the patch of light is an image of the suncrossover at 0.22 mthe sun subtends 9.30 mradpatch 58 mm wide at 6 m
Fig. 7 A smaller gap, and a crossover four times closer. Below half a metre a 2 mm gap already projects the sun rather than itself, which is why the effect is so common.

What the sun’s angular width is doing there

One last observation, because the number α=9.30\alpha = 9.30 mrad is doing more work in ordinary life than it gets credit for.

It sets the softness of every outdoor shadow. A post 2 m tall casts a shadow whose edge is smeared by 2×0.0093=192 \times 0.0093 = 19 mm at its tip, which is why an outdoor shadow’s edge is sharp near the object and visibly soft several metres away.

It sets the crossover distance above. It sets the smallest detail a pinhole camera can resolve when the subject is the sun. And it is why an eclipse is possible at all — the moon subtends very nearly the same angle, which is a coincidence of the present epoch and has nothing to do with any of the geometry here.

Every one of those follows from treating the source as an object with an angular size and the occluder as a centre of projection, which is the whole of this essay in one sentence.