Light and mirrors

The edge of a shadow is drawn on the object

The outline of a cast shadow is the image of a curve, and the curve is on the caster. It is not painted there: it slides when the lamp moves, it is not the outline the camera sees, and the two coincide only in the arrangement where no shadow is visible at all.

Worth reading first: A shadow is a second projection · A lamp lights less than half a ball.

A ball sits on a floor with a lamp above it, and there is a dark patch on the floor with a definite edge. Ask what that edge is the shadow of and the natural answer — the edge of the ball — turns out to name two different curves, neither of which is an edge and only one of which is doing the casting.

The shadow's edge and the drawn outlineTwo circles on the same ball. One is where the surface turns away from the lamp — it is the curve whose shadow is the edge of the cast shadow, and at 2.6 m it lies 80.0° from the lamp's direction rather than the 90° of a great circle. The other is where the surface turns away from the eye, at 84.0°. They are 88.9° apart and they coincide only when the lamp is at the eye, which is the arrangement in which no shadow is visible.88.9° between the two circlescorrect from 23 cm, at 160 mm widelamp 2.6 m · shadow circle at 80.0°
Fig. 1 Two circles on one ball. One is where the surface turns away from the lamp; the other is where it turns away from the eye. Neither is drawn on the ball, and they are not the same circle.
The shadow's edge and the drawn outlineTwo circles on the same ball. One is where the surface turns away from the lamp — it is the curve whose shadow is the edge of the cast shadow, and at 4.5 m it lies 84.3° from the lamp's direction rather than the 90° of a great circle. The other is where the surface turns away from the eye, at 84.0°. They are 88.9° apart and they coincide only when the lamp is at the eye, which is the arrangement in which no shadow is visible.88.9° between the two circlescorrect from 23 cm, at 160 mm widelamp 4.5 m · shadow circle at 84.3°
Fig. 2 The lamp taken further out. The circle it defines has opened toward a great circle and the two curves have closed on each other, because the lamp and the eye now subtend a smaller angle at the ball.

The curve that casts

A ball has no edge. Every point of it is like every other, and what makes some of it lit and some of it dark is not a property of the surface but a relation between the surface and the lamp: a point is lit when its outward normal leans toward the lamp and unlit when it leans away.

The boundary between those two regions is where the normal is exactly perpendicular to the ray — where the surface turns away — and that boundary is a curve on the object. It has a name in the vision literature, the contour generator, and it is the thing whose shadow is the edge of the cast shadow.

For a ball the curve is a circle, and it is not the obvious circle. A lamp at distance d from the centre of a ball of radius R touches the ball along the circle at an angular radius of arccos(R/d) from the lamp’s own direction. That is the circle where the tangent cone from the lamp meets the sphere, and the tangent cone is the same object the shadow of a ball is a conic intersects with the floor.

The lamp's circle opens to a great circle only at infinityThe curve where a ball's surface turns away from a lamp is the circle at acos(R/d) from the lamp's direction. At two radii it is 60.0°, at ten radii 84.3°, and at a hundred 89.43°. The 90° everybody draws belongs to the sun.2040608051015distance from the ball's centre, in radiiangular radius of the lit cap (degrees)a great circle — the sun's answeracos(R/d)never reached by a lamp in the room
Fig. 3 The angular radius of the lit cap, against the lamp’s distance in radii. It reaches ninety degrees — a great circle — only at infinity.

Two consequences fall straight out and both are the wrong way round from the usual picture.

It is smaller than a great circle. At two radii from the centre the circle sits at sixty degrees from the lamp’s direction; at ten radii, a shade over eighty-four; at a hundred, eighty-nine and a half. It opens to a full ninety degrees only for a lamp at infinity, which is to say the sun. Every drawing that shows a ball lit exactly half is drawing sunlight, whether or not it means to.

It moves. Carry the lamp round and the circle goes with it, sliding over a surface on which nothing is marked. This is the whole of what “the edge of a shadow is drawn on the object” means: there is a curve, it is on the object, and it is not a property of the object.

The site already has one half of that statement, at a lower rung. A lamp lights less than half a ball computes the lit fraction — how much of the surface a near lamp reaches — and the number there is the same geometry read as an area. What that essay does not say is what the boundary of the lit region is for, which is that it is the caster.

There is a third consequence which is not about the ball at all. The quantity arccos(R/d) is the complement of the tangent cone’s half-angle, and the tangent cone is what the whole of the sphereshadow ladder is built on — so this circle is not a new object introduced to talk about terminators. It is the contact circle of a cone the site has been using since the shadow of a ball was first drawn, looked at from the object’s side instead of the floor’s.

How much of a ball a source lightsThe curve is (1 − R/D)/2 and the dots are a quadrature over the surface that tests each patch by whether it can see the source. A lamp 2 radii away lights 25.00% of the ball, not 50% — the half is the limit and nothing finite reaches it.0204051015distance from the source to the ball, in radiifraction of the ball's surface that is lit (%)one half — the source at infinity25.0% at 2 radiicurve: the closed form · dots: quadratureagreeing to 5e-4
Fig. 4 The same geometry read as an area: what fraction of a ball a lamp at a stated distance reaches. The boundary of that lit region is the curve this essay is about.

The curve the camera sees

Now do the same thing with an eye instead of a lamp.

A camera looking at the ball has its own contour generator: the circle where the surface turns away from the eye, at arccos(R/D) from the eye’s direction for an eye at distance D. Its image is the outline of the ball in the photograph — the disc’s rim, the thing a person would trace with a pencil.

Two circles, then, on one ball, and both of them determined by something outside the ball. In the figure above they are about eighty-nine degrees apart, which is very nearly the largest they can be while both remain visible; move the lamp round toward the camera and they close up; move it behind and they open out.

The angle between them is exactly the angle the lamp and the eye subtend at the ball’s centre, and that is a statement with a closed form to be checked against — which it is, in the site’s own gate, because a walked curve agreeing with a formula is the difference between having found the contour generator and having found a level set of the parametrisation used to look for it.

The shadow's edge and the drawn outlineTwo circles on the same ball. One is where the surface turns away from the lamp — it is the curve whose shadow is the edge of the cast shadow, and at 1.4 m it lies 71.3° from the lamp's direction rather than the 90° of a great circle. The other is where the surface turns away from the eye, at 84.0°. They are 88.9° apart and they coincide only when the lamp is at the eye, which is the arrangement in which no shadow is visible.88.9° between the two circlescorrect from 23 cm, at 160 mm widelamp 1.4 m · shadow circle at 71.3°
Fig. 5 A lamp less than three radii out. The lit cap is visibly less than a hemisphere and the shadow it casts is correspondingly wide.

Walked, not assumed

The circle at arccos(R/d) is a closed form, and a closed form is exactly the thing this site refuses to draw from. So the curve in the figures is not that circle. It is found by walking the ball’s own surface on a parameter grid, evaluating the dot product of the normal against the direction to the lamp, and keeping every place it changes sign.

Then the two are compared, and the comparison is the check. Across lamps from just above the surface to a hundred radii out, the walked curve’s mean angular radius agrees with arccos(R/d) to within a millionth of a degree, and — this is the half that matters — the spread of the walked points about that mean is smaller still.

The spread is the real test. A walk that had accidentally found a level set of the parametrisation rather than the tangency would still produce a closed curve on the ball, would still be smooth, and would still move when the lamp moved. What it would not do is have every one of its points at the same angle from the lamp’s direction, at every lamp. The spread is what says the walk found a circle rather than something circle-shaped.

The shadow of a ball, under a lamp 2.40 m upThe lamp's tangent cone cuts the ground in an ellipse. The top of the ball is at 0.84 m and the lamp at 2.40 m: above that height the shadow closes, below it the shadow reaches the horizon, and the ball's distance from the lamp appears nowhere in the condition.the lamp is above the top of the ball — an ellipsecorrect from 22 cm, at 160 mm wideaxis ratio 0.5418 · discriminant -1.14e+0
Fig. 6 The tangent cone, whose contact circle with the ball is the curve on the left of the argument and whose section with the floor is the shadow on the right.
How much of a ball a source lightsThe curve is (1 − R/D)/2 and the dots are a quadrature over the surface that tests each patch by whether it can see the source. A lamp 1.4 radii away lights 14.29% of the ball, not 50% — the half is the limit and nothing finite reaches it.0204051015distance from the source to the ball, in radiifraction of the ball's surface that is lit (%)one half — the source at infinity14.3% at 1.4 radiicurve: the closed form · dots: quadratureagreeing to 5e-4
Fig. 7 Close in, where the lit fraction falls away quickly and the difference between a lamp and a sun is at its largest.

Reading the lamp off the two circles

If both curves are visible in one photograph, the lamp’s direction comes out of them.

The ball’s outline gives the eye’s own circle, which is a known consequence of where the camera is. The terminator gives the lamp’s. Each of the two circles lies in a plane, and the axis of each is perpendicular to its plane through the ball’s centre — so the lamp is along the terminator’s axis, and how far along it is set by the circle’s angular radius through arccos(R/d).

That is a complete recovery of a lamp from one ball in one picture, and it is a different route from the one the light field already has. The lamp out of the picture recovers a lamp from drawn shadow lines: the joins of post-tops to shadow-tips meet at the lamp’s image, and the joins of feet to tips meet at the image of its foot. That construction needs posts and a ground plane and knows nothing about the objects except that they stand upright.

This one needs a single ball and no ground at all. What it needs instead is a shaded photograph — the terminator has to be findable, which means the surface has to be smooth enough to have one and lit clearly enough for it to be located. The two routes fail in different places, which is why having both is worth something: the shadow-line construction is defeated by a scene with no vertical in it, and this one by a scene with no smooth solid.

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 1e-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. 8 The route this collection already had to a lamp: drawn shadow lines from posts. It needs uprights and a ground plane, where the two-circles route needs a smooth solid and shading.
The lamp's circle opens to a great circle only at infinityThe curve where a ball's surface turns away from a lamp is the circle at acos(R/d) from the lamp's direction. At two radii it is 60.0°, at ten radii 84.3°, and at a hundred 89.43°. The 90° everybody draws belongs to the sun.2040608051015distance from the ball's centre, in radiiangular radius of the lit cap (degrees)a great circle — the sun's answeracos(R/d)never reached by a lamp in the room
Fig. 9 The closed form again, with the great circle drawn as the line the curve never reaches.

They coincide exactly once

Put the eye at the lamp. Then the two axes are the same axis, the two circles are the same circle, and the shadow’s edge is the object’s outline.

This is not a curiosity; it is the reason a photograph taken with a flash mounted at the lens shows no shadow. The shadow is still there — the floor behind the ball is still dark — but it is exactly hidden behind the ball from that viewpoint, because the boundary of the dark region and the boundary of the ball’s image are the same curve on the film. The whole umbra lies inside the ball’s silhouette.

So the arrangement in which the two curves agree is precisely the arrangement in which the disagreement between them cannot be seen. That is the shape of a great many things on this site: the case in which a rule is exact is the case in which the rule was never needed. The forty-five degree shadow is exact in the plan, where nobody is standing.

The shadow's edge and the drawn outlineTwo circles on the same ball. One is where the surface turns away from the lamp — it is the curve whose shadow is the edge of the cast shadow, and at 6.0 m it lies 85.7° from the lamp's direction rather than the 90° of a great circle. The other is where the surface turns away from the eye, at 84.0°. They are 88.9° apart and they coincide only when the lamp is at the eye, which is the arrangement in which no shadow is visible.88.9° between the two circlescorrect from 23 cm, at 160 mm widelamp 6.0 m · shadow circle at 85.7°
Fig. 10 Six metres out, which is more than thirteen radii. The lit cap is close to a hemisphere and a drawing made with a great circle would be nearly right.

What it costs to get this wrong

An illustrator drawing a ball lit from one side has to decide where the terminator goes, and the two available answers differ by an amount that is easy to compute and not always small.

Draw it as a great circle and the lit region is exactly half the sphere. Draw it correctly for a lamp two radii away and the lit cap is a cone of sixty degrees rather than ninety — visibly less than half, and by an amount that changes the shape of the highlight and the placement of the darkest part of the drawn edge.

Whether a viewer notices is not a question this site has any standing on. What it can say is that the two are different pictures of two different arrangements, and that the great circle is the picture of a sun. A drawing that puts a lamp in the room and a sun’s terminator on the ball is internally inconsistent, in the same way and to the same degree as a drawing whose four posts imply four suns.

How much of a ball a source lightsThe curve is (1 − R/D)/2 and the dots are a quadrature over the surface that tests each patch by whether it can see the source. A lamp 8 radii away lights 43.75% of the ball, not 50% — the half is the limit and nothing finite reaches it.0204051015distance from the source to the ball, in radiifraction of the ball's surface that is lit (%)one half — the source at infinity43.8% at 8 radiicurve: the closed form · dots: quadratureagreeing to 5e-4
Fig. 11 The lit fraction at eight radii. Approaching a half rather than reaching it, which is the same statement as the angular radius approaching ninety degrees.

The general case, and where the argument stops

A ball is the case where the contour generator is a circle and everything has a closed form. For a general smooth solid it is the set where (p − L)·n(p) = 0 on the surface, and there is nothing tidy about it:

  • it need not be connected — a non-convex solid can turn away from a lamp in several separate bands;
  • it need not be planar, and for anything that is not a quadric it usually is not;
  • and points of it can be hidden from the lamp by other parts of the same solid, in which case they are on the boundary of nothing and cast no edge at all.

That last one is the honest limit of the tidy statement. The full sentence is not the shadow’s edge is the image of the contour generator but the shadow’s edge is the image of the parts of the contour generator the lamp can actually see, and deciding which parts those are is an occlusion question rather than a differential one. For the convex casters in this essay the two sentences agree, because a convex body never hides its own contour generator from the light that defined it.

The shadow's edge and the drawn outlineTwo circles on the same ball. One is where the surface turns away from the lamp — it is the curve whose shadow is the edge of the cast shadow, and at 1.0 m it lies 63.3° from the lamp's direction rather than the 90° of a great circle. The other is where the surface turns away from the eye, at 84.0°. They are 88.9° apart and they coincide only when the lamp is at the eye, which is the arrangement in which no shadow is visible.88.9° between the two circlescorrect from 23 cm, at 160 mm widelamp 1.0 m · shadow circle at 63.3°
Fig. 12 The lamp brought in close. The circle it defines has shrunk toward the lamp’s own side and the two curves have moved apart; the cast shadow has grown, because the tangent cone is wider.
The same wire, lamp 40 cm awayThe lamp has been moved 40 cm off the wire's tangent surface. No tangent reaches it — the closest approach is 2.6e-3 — and the sharpest turn in the shadow drops to 15.5°.correct from 19 cm, at 160 mm wide46° across
Fig. 13 The previous essay’s caster, for contrast. A wire has no surface to turn away, so its shadow’s edge is the image of the wire itself rather than of a curve chosen by the lamp.

Why the shadow grows when the lamp comes in

The figure above answers a question the two circles make natural. A lamp brought closer casts a bigger shadow, and the reason is now visible rather than a fact about similar triangles: bringing the lamp in shrinks the contour generator toward the lamp’s side of the ball, which widens the tangent cone, and a wider cone cuts the floor in a bigger conic.

Both effects are the same arccos. The angular radius arccos(R/d) is what the cone’s half-angle is the complement of, so the curve on the ball and the spread of the shadow are two readings of one number. That is the sort of thing the site looks for and does not always find: a quantity that turns up in two different-looking claims because there is only one quantity.

The shadow of a ball, under a lamp 1.60 m upThe lamp's tangent cone cuts the ground in an ellipse. The top of the ball is at 0.84 m and the lamp at 1.60 m: above that height the shadow closes, below it the shadow reaches the horizon, and the ball's distance from the lamp appears nowhere in the condition.the lamp is above the top of the ball — an ellipsecorrect from 22 cm, at 160 mm wideaxis ratio 0.3448 · discriminant -4.60e-1
Fig. 14 A low lamp, where the cone is wide and its contact circle sits far round toward the lamp’s own side of the ball.
The patch a pixel sees, the light reaching it, and what the picture recordsThe patch one pixel covers grows as the square of the distance and the light per unit area falls as the square of the distance, so their product is flat — 2e-16 across a fiftyfold change. A surface does not get darker as it goes away, which is why aerial perspective has to be the air.00.50011020304050distance from the camera to the wall (m)relative to the value at 1 mthe patch, growing as d²the light per unit area, falling as 1/d²their product — what the picture records2500× the footprint at the far endproduct flat to 2e-16
Fig. 15 The one photometric statement this collection makes, and the boundary beside it: how much of a surface a pixel covers is geometry, and how much energy arrives is not.

The band, rather than the curve

Everything above is drawn with a point lamp, and a point lamp is a fiction with a known error term.

A source of finite size does not produce a terminator; it produces a band, because a point of the surface can see part of the source and not the rest. The band’s angular width at the ball is the angular width of the source seen from that point, and the site has computed exactly this quantity once before: the penumbra is the lamp’s image shows that the soft edge of a cast shadow is the source imaged through the occluding edge, which is the same statement read on the floor rather than on the ball.

So the two curves in the figures should be read as the middles of two bands. For the sun the band is about half a degree wide, which on a ball is a strip a couple of hundredths of the radius across and negligible for anything here. For a bare bulb at two radii it is wide enough to see, and for a window it is wide enough that the word terminator stops being useful.

What does not change is the geometry of the middle. The band is centred on the point lamp’s answer, because the source’s own centre is a point lamp, and everything above is a statement about it.

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. 16 The soft edge, computed as the source’s own image through the occluding edge. On the ball the same width appears as a band rather than a curve.

The sun, and the one time the drawing is right

The lit half of a ball under the sun is exactly half, and the terminator is exactly a great circle, and this is the one case in which the picture everybody draws is the correct one.

It is worth saying why it is exact rather than very close. The sun subtends about half a degree, so a naive expectation would be that the terminator is a great circle to within some fraction of a degree. But the relevant distance is not the sun’s angular size, it is the sun’s distance in ball radii — a hundred and fifty million kilometres against a ball a few centimetres across — and arccos(R/d) for that ratio differs from ninety degrees in the fourteenth decimal place. The great circle is right to well past any precision a drawing has.

Which puts the boundary in an unexpected place. The terminator’s departure from a great circle is a near-field effect, invisible for anything astronomical and obvious for a table lamp, and the crossover is at a few tens of radii rather than anywhere far away. A lamp three metres from a football is already within it.

The shadow's edge and the drawn outlineTwo circles on the same ball. One is where the surface turns away from the lamp — it is the curve whose shadow is the edge of the cast shadow, and at 0.8 m it lies 55.8° from the lamp's direction rather than the 90° of a great circle. The other is where the surface turns away from the eye, at 84.0°. They are 88.9° apart and they coincide only when the lamp is at the eye, which is the arrangement in which no shadow is visible.88.9° between the two circlescorrect from 23 cm, at 160 mm widelamp 0.8 m · shadow circle at 55.8°
Fig. 17 A lamp almost touching the ball, where the lit cap is a little over half a right angle across and the shadow it casts runs off the sampled floor.
How much of a ball a source lightsThe curve is (1 − R/D)/2 and the dots are a quadrature over the surface that tests each patch by whether it can see the source. A lamp 3.5 radii away lights 35.71% of the ball, not 50% — the half is the limit and nothing finite reaches it.0204051015distance from the source to the ball, in radiifraction of the ball's surface that is lit (%)one half — the source at infinity35.7% at 3.5 radiicurve: the closed form · dots: quadratureagreeing to 5e-4
Fig. 18 The lit fraction at three and a half radii, a lamp distance an ordinary room supplies.

The habit this is a case of

Three essays in this row are about the same mistake, made about three different features of a shadow, and it is worth stating in the form that transfers.

A feature you can see in a shadow is a feature of an arrangement, not of the thing casting it. Take away the lamp, or move it, and the feature is somewhere else or gone.

The cusp in a wire with a corner in its shadow is at a point of the wire that changes when the lamp moves. The hole in a ring’s shadow, in a hole is not preserved, is present or absent depending on how obliquely the lamp sees the ring. And the edge here is cast by a curve that is on the ball and belongs to the lamp.

Each of the three is easy to state and each is routinely got wrong in the same way — by treating the shadow as a picture of the object rather than as a picture of the object and the lamp and the floor, jointly. A shadow is a projection, and a projection has a centre; the centre is half of what is being seen.

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.

ConicContour generatorForeshorteningOcclusionPoint lightShadow projectionSolid angleStation pointTangent coneUmbra