Light and mirrors

A lamp lights less than half a ball

Everyone knows a sphere is half lit. It is half lit by a source at infinity and by nothing else: a lamp two radii away lights a quarter of it, and the boundary it draws is a circle offset toward the light rather than a great circle. The offset is R²/D, which means a photograph of a lit ball carries the distance to whatever lit it.

Worth reading first: The shadow of a ball is a conic · A shadow is a second projection.

Half a sphere faces any direction, so half a sphere is lit. It is one of those statements that is so obviously true that nobody checks it, and it is true of exactly one case: a source infinitely far away.

For a source at a finite distance DD from the centre of a ball of radius RR, the lit cap runs out to the angle whose cosine is R/DR/D, and the fraction of the surface inside that cap is

1R/D2\frac{1 - R/D}{2}

which is a half only in the limit. A lamp ten radii off lights 45% of the ball. A lamp two radii off — a bare bulb a foot from an orange — lights 25%, which is a quarter and not a half.

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. 1 The lit fraction against the source’s distance in radii. The curve is the closed form and the dots are a quadrature over the surface that tests each patch by whether it can see the source; they agree to within a thousandth. The dashed line is the half that everybody quotes, approached and never reached.

Where the boundary actually is

The terminator — the line between lit and unlit on the object itself — is where the source grazes the surface. A ray from the source is tangent to the ball at the points where the angle from the centre reaches arccos(R/D)\arccos(R/D), and those points form a circle.

That circle is not a great circle. It lies at R2/DR^2/D from the centre, displaced toward the source, and its radius is R1R2/D2R\sqrt{1 - R^2/D^2}, which is smaller than RR. Both effects vanish as DD grows, and neither vanishes at any finite distance.

So the picture in everyone’s head — the terminator as a great circle, the equator of a tilted sphere — is the limiting case drawn as though it were the general one. For the moon it is very nearly right: the sun is about 23,000 solar-system radii away in the relevant sense, and the offset is negligible. For a photographic softbox at a metre from a face it is not right at all.

The same circle, twice

This is the same circle the shadow rung casts. There it was called the silhouette, and its shadow is the boundary of the cast shadow; here it is called the terminator and it is the boundary of the lit region on the ball itself.

They are one circle because they are one geometric object: the set of tangency points of the cone from the source. Approaching it from the lit side gives the terminator; projecting it onto the floor gives the cast shadow’s edge; and the fact that the two subjects share the circle is why one function computes both.

The shadow of a ball, under a lamp 1.90 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.90 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.4274 · discriminant -7.08e-1
Fig. 2 The tangent cone drawn, with the ball on the ground. The circle where the cone touches the ball is the terminator; the conic where the cone meets the floor is the shadow’s edge. One cone, two boundaries, and the second is the projection of the first.
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 10 radii away lights 45.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 infinity45.0% at 10 radiicurve: the closed form · dots: quadratureagreeing to 5e-4
Fig. 3 Ten radii — 45% lit, and still not a half. The approach is slow because the shortfall is R/2D, so an order of magnitude in distance buys only an order of magnitude in the error.

Reading the distance out of a picture

The offset is R2/DR^2/D, so it carries DD. And it is visible: seen from the side, the terminator’s image is displaced from where a great circle’s image would be, and the displacement falls exactly as 1/D1/D.

That gives the round trip. Photograph a lit ball, measure how far the terminator’s image sits from the sphere’s own centre line, and the source’s distance follows — in units of the ball’s radius, which is the honest form since a single picture cannot supply a scale. At six radii, on a 690-pixel figure, the displacement is a couple of dozen pixels, which is a great deal more than a photograph’s noise.

For the moon this is the classical measurement and it has a famous history. Aristarchus reasoned that at exact half-moon the sun, moon and earth form a right angle, measured the elongation, and got a sun distance nineteen times the moon’s — the method exact, the measurement hopeless, since the true elongation is 89.85° and he needed a fraction of a degree. What the terminator’s bulge offers is the same information from the moon’s own face rather than from an angle in the sky, and it is just as hopeless for the moon, because R2/DR^2/D for the sun-moon system is a part in twenty-three thousand of the moon’s radius. It is entirely practical for a lamp in a room.

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 6 radii away lights 41.67% 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 infinity41.7% at 6 radiicurve: the closed form · dots: quadratureagreeing to 5e-4
Fig. 4 The lit fraction at six radii — 41.67%, and still not a half. The quantity is the same one the bulge measures, from the other side: how much is lit and how far the boundary has moved are two readings of one angle.
The shadow of a ball, in sun at 52°Sunlight round a ball is a circular cylinder, and a cylinder cuts a plane in an ellipse at every altitude — so the sun cannot make an open shadow. The minor axis is the ball's own diameter and the ratio of the axes is 0.7893, which is the sine of 52°.sunlight: a cylinder, so always an ellipsecorrect from 22 cm, at 160 mm wideaxis ratio 0.7893 · discriminant -2.49e+0
Fig. 5 The limiting case on the floor rather than on the ball. Sunlight makes the tangent cone a cylinder, the silhouette a great circle and the lit fraction exactly a half — the three statements are one statement about the same tangency.

What it does to a picture

Three consequences for anybody drawing or judging a lit sphere, and the third is the one that has bitten software.

A nearby source makes the lit region smaller, not merely differently placed. The dark side grows, and the growth is the whole difference between 50% and 25% at two radii. A drawing lit by a lamp in the room and shaded as though by the sun is wrong in area, not just in softness.

The terminator’s curvature is not the ball’s. Its image is an ellipse — the projection of a circle — but of a smaller circle, offset. Drawing the terminator as a diameter of the drawn disc, which is what a half-lit sphere is nearly always drawn as, assumes the source is at infinity even when the rest of the picture says otherwise.

And the cast shadow and the terminator have to agree. They come from one cone, so a picture whose terminator says the lamp is close and whose cast shadow says it is far is inconsistent, and inconsistent in a way that is checkable rather than a matter of feel. That is the shadow rung’s consistency test with the object added.

The outline, the shadow, and the outline againThe inverse is run through a lamp displaced by 60 mm. The recovered outline is 23.23 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 60 mm out of placecorrect from 20 cm, at 160 mm wide23.23 mm out
Fig. 6 The related sensitivity, from the un-casting rung. Being wrong about where the lamp is costs a proportional error in everything computed from it — the terminator’s offset and the shadow’s shape both move, and they move together, which is what makes the agreement between them a test.
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 A measurement that does not care about the distinction. A post has no thickness, so its shadow gives the light’s direction whether the source is a metre away or a hundred million kilometres — which is why the difference this rung is about only appears for objects with a size.

The limit, and why it is worth stating as one

At D/R=100,000D/R = 100{,}000 the lit fraction is 49.9995% and the offset is 10510^{-5} of the radius. So the familiar half is not an approximation anybody should feel bad about — for the sun and anything on earth it is right to more decimal places than any measurement will reach.

Stating it as a limit rather than as a fact is worth doing anyway, and for the same reason the eye taken to infinity is worth stating as a limit. A fact with no parameter in it cannot say when it stops applying. A limit with R/DR/D in it says exactly: the error in “half” is R/2DR/2D, so it reaches one percent at fifty radii and ten percent at five.

A parallel projection is a perspective one with the eye taken awayThe four small boxes are photographs from 2 m, 6 m, 24 m, 240 m with the lens lengthened to match. The isometric drawing is the limit, and its bundles stay parallel to 0e+0 radians.isometric — the limit2 m6 m24 m240 msame box, same drawn sizethe eye recedes
Fig. 8 The same move in the parallel field. A parallel projection is a photograph from infinitely far away, so the exact statements about parallel projection are limits of statements about cameras — and knowing which limit tells you how far away is far enough.

Fifty radii is not far. A face lit by a window is at two or three head-radii from the near part of the window; a product photographed in a light tent is at one or two. The regime where the half is wrong by more than a percent is the regime almost all indoor lighting is in.

A box over a reflecting floor, with the reflection computed twiceReflecting the scene and reflecting the camera disagree by 407 px and agree to 0e+0 px once one image axis is reversed — which is what a mirror reversing handedness looks like in numbers.grey: the reflectiontwo routes, agreeing to 0e+0 px after one flip
Fig. 9 The third centre of projection in the same room. A mirror image is a view from a reflected camera, a shadow is a view from the lamp, and a terminator is the tangency of that second view — all three computed by one machine with the centre moved.

What the quadrature is doing, and why it is worth doing

The closed form is three symbols and could have been asserted. It is checked against a numerical integration instead, and the way the integration is set up is the part worth describing, because a badly weighted quadrature agrees with a closed form for the wrong reason and cannot be told apart from a good one by looking at the answer.

The surface is divided into bands of equal area rather than equal angle. On a sphere, bands of equal area are bands of equal thickness in the cosine of the polar angle — Archimedes’ result, and the reason a sphere and its circumscribing cylinder have the same area between any two parallel planes. So a plain count of lit bands is an area fraction with no weighting factor anywhere, and there is no weight to get wrong.

Each band is then tested by the condition that decides it: the outward normal at a point faces the source, which is a single dot product and involves nothing about brightness or reflectance. A patch is lit when the segment from it to the source leaves the ball, and unlit when the ball is in the way.

The two routes agree over the whole sweep from just outside the ball to a hundred thousand radii. That is what makes the closed form a result rather than a definition — and the equal-area setup is what makes the agreement mean something rather than being an artefact shared by both.

The other end: a source larger than the object

The formula assumes a point source, and a real source has a size. It is worth saying what happens at the other end, because the direction of the effect reverses.

A source larger than the object and close to it lights more than half. A ball held against a large window is lit from a whole hemisphere of directions, and the fraction of its surface reached by at least one of them exceeds a half — the limiting case being a ball inside a uniformly bright sphere, which is lit everywhere.

So the lit fraction runs from just above zero, for a point source almost touching the surface, through exactly a half for a point source at infinity, to unity for an enveloping one. The point-source result this rung computes covers the lower half of that range, and it is the half that matters for a lamp.

The two regimes are separated by the source’s angular size as seen from the object, which is the same quantity that decides how soft the shadow’s edge is. That is not a coincidence and it is the penumbra rung’s subject: a source’s angular width sets both how much of a ball it lights and how wide the soft band around the ball’s shadow is, because both are questions about which parts of the source a given point can see.

Which makes the terminator and the penumbra one measurement taken on two objects — on the ball, and on the floor beneath it.

The moon, which is the case everybody has in mind

The half-lit sphere is almost always introduced with the moon, and the moon is the one object for which the half is right to more decimal places than anybody needs — so it is worth saying exactly why, because the reason is a ratio rather than a fact about the moon.

The sun is about four hundred solar radii from the earth in the units that matter here, and the moon’s radius against its distance from the sun gives an R/D of roughly one part in twenty-three thousand. The lit fraction is therefore 0.499989, and the terminator’s offset from the moon’s centre is about seventy metres on a body seventeen hundred kilometres in radius. No telescope resolves that and no photograph carries it.

Which means the moon is a demonstration of the limit rather than an instance of the general case, and using it to introduce the subject leaves the general case unmentioned. The objects for which the general case matters are the ones lit from within a room: a face at a window, a product in a light tent, an apple under a desk lamp. In every one of those, R/D is between a tenth and a half, and the lit fraction is between 45% and 25%.

There is a second reason the moon is the wrong example, and it is about the shape rather than the fraction. At half moon the terminator’s image is a straight line down the disc, and it is straight because the source is at infinity. A nearby lamp on a nearby sphere gives a terminator that is visibly bowed toward the light, and the bow is the readable quantity this rung is about. Introducing the subject with the one case where the bow is unmeasurable puts the interesting quantity out of sight.

The consequences for a picture, in order of size

The dark side is bigger than half, always. For an object lit by a source in the same room, the unlit fraction is more than half by R/2D. A softbox a metre from a head twenty centimetres across gives about 5% more dark than the sun would; a bare bulb at arm’s length from an orange gives a great deal more.

The terminator’s image is displaced, and the displacement is readable. By R²/D toward the light, projected. At six radii on a 690-pixel figure it is a couple of dozen pixels, which is far more than a photograph’s noise and far less than anybody draws.

And the terminator’s curvature is not the ball’s. Its image is the projection of a circle smaller than the sphere’s great circle, so it is an ellipse of a different eccentricity — which is why a half-lit sphere drawn with a straight terminator down its middle is drawing a source at infinity, whatever the rest of the picture says about the lamp.

None of the three is large enough to be obvious and all three are large enough to measure, which is the size of effect this site is usually about.

Why the geometry is worth having when the photometry is not

The lit fraction is a purely geometric quantity: it counts area, and it needs to know nothing about the surface. How bright the lit part looks is photometry and needs to know a great deal — the surface’s reflectance, whether it scatters like matte plaster or like polished metal, what else in the room is bouncing light back.

So the two halves of “how is this ball lit” have completely different epistemic status, and the geometric half is the one that can be checked to arithmetic noise. The closed form here is checked against a quadrature over the surface, in bands of equal area so that a plain count is an area fraction and no weighting can be got wrong, and the two agree over the whole sweep from just-outside-the-ball to a hundred thousand radii.

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. 10 The boundary between the two halves, drawn. What a picture records of a surface is a product of two quantities that cancel exactly — geometry — and what the surface does with the light that reaches it is not on that list.
A 28 cm source, an edge, and the band betweenThe penumbra is 14.0 cm wide by the projection — the source's width times the receiver-to-occluder distance over the source-to-occluder distance — and 13.9 cm by counting how much of the source each point can see. The two routes share no arithmetic.source, 28 cmthe occluder's edgefraction of the source visiblepenumbra 14.0 cmprojection: 14.00 cmsampled: 13.93 cm
Fig. 11 The third member of the family, and the one that is entirely geometric despite looking photometric. A shadow’s soft edge is an image of the source projected through the occluder’s edge, so its width is a projection computed with the same machinery — no integration, and no knowledge of how bright anything is.

The pattern across the three is worth stating because it is what this field is for. Every question about light that turns out to be a question about where the rays go is answerable here to fifteen digits: the shadow’s shape, the terminator’s position, the penumbra’s width, the lamp’s recovered coordinates. Every question about how much energy arrives is a different subject wearing the same words. The half-lit sphere is a question of the first kind that everybody has answered as though it were too obvious to be either.

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 projectionConicDemonstrationDepth cuePoint lightRadianceSilhouetteSubtended angleTangent coneTerminator