Light and mirrors

Where shadows vanish

The shadows of parallel posts under the sun meet at a point, and that point must lie on the horizon. Under a lamp they meet at the lamp's foot instead. Both are checkable in any photograph, and a picture whose shadows fail the check was not lit by anything.

Six posts stand in a row, vertical, on level ground, in sunlight. Their shadows are parallel to each other in the world, because the sun’s rays are parallel and the posts are.

In the picture they converge. They must, because parallel world lines converge to a vanishing point, and shadow lines are world lines like any other.

Where they converge is determined, and it is worth knowing because it is checkable in a photograph with nothing but a straightedge.

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. 1 Six posts and their shadows. The vanishing point is found by least squares from the drawn shadows, with the residual reported; it agrees with the vanishing point of the sun’s ground direction and it lies on the horizon.

Why it is on the horizon

The shadows lie on the ground, and their direction is the sun’s direction projected onto the ground — a horizontal direction.

The horizon is the image of all the ground plane’s points at infinity, which is to say the vanishing points of all horizontal directions. The sun’s ground direction is one of them. So its vanishing point is on the horizon.

Measured on the site’s figures, the drawn shadow lines meet at a point whose residual is under 10⁻⁶ px, and that point sits on the horizon to within 10⁻⁶ px as well. Both numbers are checks rather than illustrations: a construction that put the shadows’ meeting point anywhere else would be constructing shadows for a light source that is not at infinity.

The lamp case, which converges somewhere else

Under a point lamp the shadow lines are not parallel in the world. They radiate from the point on the ground directly below the lamp.

So they do not have a vanishing point at all — they have a genuine common point, at a finite place in the scene, and its image is the image of the lamp’s foot. It is not on the horizon and there is no reason for it to be.

That gives an immediate diagnostic for any picture with shadows in it.

Shadow lines converging on the horizon: the light is at infinity. Sunlight, or a source far enough away to count.

Shadow lines converging somewhere below the horizon: a local light source, and the convergence point is directly below it.

Shadow lines converging above the horizon: the light is behind the camera and below the horizon — a low sun in front of the viewer casts shadows that converge to a point on the horizon on the far side, which is the case that produces shadows running toward the viewer.

Shadow lines not converging at all: more than one light source, or a picture whose shadows were not constructed.

The altitude and the length

The sun’s height above the horizon fixes how long the shadows are, and the relation is a cotangent.

A post of height h with the sun at altitude α casts a shadow of length h·cot α. At 45° the shadow equals the height. At 10° it is 5.7 times the height. As the sun approaches the horizon the shadow grows without bound, which is why late-afternoon shadows run across whole fields.

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. 2 Shadow length against solar altitude, for a 1 m post. The curve is a cotangent, it passes through 1 m at 45°, and it has no upper bound.

The altitude is also recoverable from a picture. Given the shadow’s vanishing point on the horizon and the vanishing point of the light rays themselves — found from the lines joining each post’s top to its shadow tip — the angle between them, converted through the camera’s focal length, is the sun’s altitude.

That requires the focal length, which a picture with anything rectangular in it will supply. So a photograph can be asked what time of day it was taken, in the sense of what the solar altitude was, using nothing but its own contents.

Forensic geometry

That combination — shadow direction and shadow length, both readable from the picture — is a working technique.

Consistency checking. Every shadow in a scene lit by one source must be consistent with one light position. Extending the shadow lines and checking they are concurrent, and checking the ray lines are concurrent too, tests that. A composite image assembled from two photographs taken at different times fails it, usually badly, and this is one of the standard tests for image manipulation.

Locating the light. For a lamp, the convergence point of the shadow lines is the foot and the convergence point of the ray lines is the lamp itself. Two points, both constructed with a straightedge, and the lamp’s height follows.

Timing. Solar altitude and azimuth together fix the time of day and season for a known latitude and longitude, so a photograph with shadows in it carries a timestamp that is hard to fake and easy to check.

Checking a rendering. The same test applied to computer-generated imagery finds shadows that were painted rather than cast, which is a common shortcut and one that this geometry sees immediately.

Why illustrators get it wrong

Constructed shadows in drawings fail the test constantly, and the failures fall into a few types worth naming.

Parallel shadows in a perspective drawing. Drawing the shadows of a row of posts parallel to each other on the page, because they are parallel in the world. They should converge, at the same rate everything else does.

Shadows converging to the object’s own vanishing point. A plausible-looking error: running the shadows to a point already in use. The shadow direction is a different world direction from any of the object’s edges, so it has its own vanishing point, somewhere else on the horizon.

Shadow length inconsistent with the light height. Drawing a shadow that looks about right rather than constructing it. Since the length is h·cot α and the same α applies to everything in the scene, one shadow drawn by eye makes all the others wrong relative to it.

Shadows and highlights lit from different directions. The light position determines both, and they are often drawn by different reasoning.

Each of these produces a picture that reads as slightly unconvincing without anyone being able to point at the cause, which is the recurring condition of constructions that were never measured.

The relation to the object’s own vanishing points

One structural point that ties the family together.

A scene lit by the sun has, among its directions: the three edge directions of any box in it, the sun’s ray direction, and the sun’s ground-projected direction. Each has a vanishing point. Two of them — the shadow direction and any horizontal edge direction — are on the horizon; the ray direction generally is not.

They are not independent. The ray direction, its ground projection and the vertical form a right-angled triangle in the world, so their three vanishing points satisfy the same orthogonality relation the recovery uses. Which means the sun’s position in a photograph over-determines itself, and the over-determination is a consistency check available for free.

That is the same pattern as everywhere else on this site: a quantity computable two ways, with the agreement as the measurement and the disagreement as the content.

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. 3 The other case, where the shadow lines converge on the lamp’s foot rather than on the horizon. The two constructions differ only in where the centre of projection is.

Constructing a shadow from the vanishing points alone

The two vanishing points — one for the light rays, one for the shadow directions — are all a construction needs, and having them makes the whole business mechanical.

For a vertical post: draw the line from the shadow-direction vanishing point through the post’s base, and the line from the ray vanishing point through the post’s top. Where they cross is the tip of the shadow.

For a horizontal edge: its shadow is a straight line, so only its two endpoints need constructing and the shadow is the join.

For an edge lying on the ground: it is its own shadow, which sounds trivial and is the step people forget, producing shadows detached from the objects casting them.

For a sloping edge: its shadow is again straight, from the shadows of its two ends, and its direction has its own vanishing point that is neither of the two above. That third point is on the horizon if and only if the sloping edge’s shadow direction is horizontal — which it always is, since all shadows lie on the ground — so a sloping edge’s shadow vanishing point is on the horizon too, at a different place from the vertical edges’ one.

The whole apparatus is two points and a straightedge, and once they are placed nothing is judged.

Why the sun is treated as a point

The sun subtends about half a degree, which is not a point, and treating it as one is an approximation worth being explicit about.

The consequence of the finite size is the penumbra: the region reached by part of the sun’s disc and not all of it. Its width grows with the distance from the occluder to the receiving surface, at about 1/115 of that distance — so a post’s shadow is sharp at its base and its tip is soft by a centimetre for every metre of shadow length.

That is a large effect for a tall building and invisible for a pencil, which is why building shadows have soft ends and desk objects do not. It has nothing to do with the geometry of where the shadow’s centre line goes, which is what this essay computes, and it is why a shadow can be constructed as though the sun were a point and then softened as a separate operation.

The same reasoning applies to a lamp, more strongly, because a domestic lamp is angularly much larger than the sun at ordinary distances and its shadows are correspondingly softer. A picture with hard-edged shadows from a nearby soft source is geometrically correct and physically wrong, which is a distinction worth being able to make.

The one case where the horizon rule fails

The claim that shadow lines converge on the horizon depends on the shadows lying on a level ground plane, and on sloping ground it fails.

Shadows on a hillside are still straight and still parallel to each other in the world — the sun’s rays are still parallel and the hillside is still a plane — so they still converge to a vanishing point. But that vanishing point is the image of a direction lying in the hillside’s plane, not the ground’s, so it sits on the hillside’s horizon, which is a different line.

The two horizons meet where the two planes’ common direction is, which is the horizontal direction along the slope. A picture containing both level ground and a slope therefore has two horizons and two shadow vanishing points, and getting them confused is a reliable way to produce shadows that read as sliding off the hill.

This is the same structure as every family of parallel lines having its own vanishing point — nothing new is happening, and the only trap is assuming that “the horizon” is unique when what is unique is the horizon of a given plane.

A box drawn from a known camera, and the camera recovered from the drawingThree vanishing points found from the twelve drawn edges alone give back the focal length to 4e-15 relative.recovered principal pointused to drawrecoveredgapfocal length853.90853.904e-15principal x345.0345.02e-12angle44.0°44.0°correct from 20 cm, at 160 mm wide44° across
Fig. 4 The relation the sun’s three directions satisfy is the one the camera recovery uses. Vertical, shadow direction and ray direction form a right angle in the world, so their vanishing points over-determine the geometry.
A family of parallel ground lines at 30°, and where they meetAll five lines pass through one point on the horizon, off the edge of the frame at x = 1464.horizon — the image of the line at infinityvanishing point at x = 1464 — off the framecorrect from 26 cm, at 160 mm wide34° across
Fig. 5 And the underlying fact all of it rests on: a family of parallel world lines images to a family of concurrent picture lines, with the residual saying whether they really are concurrent.
Four figures of the same height, camera level at 1.62 mThe horizon cuts every one of them at 91.0% of its height — the eye height over the figure height — however far away it is.horizon = eye level, 1.62 m91.01%correct from 26 cm, at 160 mm widespread 0
Fig. 6 Why the horizon is where the check happens. It is the image of all the ground’s points at infinity, so every horizontal direction — including the sun’s ground direction — has its vanishing point on it.

Shadows as a depth cue

Beyond the checking, the shadow’s vanishing point does something for a picture that nothing else does as cheaply.

A shadow attaches an object to the ground at a specific place. Without one, an object drawn in a scene has an ambiguous position: it could be small and near or large and far, and nothing in the picture decides. The horizon-crossing rule resolves it for objects standing on the ground, and a shadow resolves it for everything else.

The resolution is quantitative. Given the light position, the length of a cast shadow fixes the object’s height above the ground, and the shadow’s position fixes its footprint. So a shadow carries two numbers that the object’s own image does not.

That is why removing shadows from a rendering makes objects appear to float even when they are drawn in exactly the right place, and why adding a contact shadow — a small dark patch at the point of contact — is enough to anchor an object even when the rest of the shadow is omitted. The contact point is where the shadow and the object coincide, and it is the single most informative point in the whole construction.

Two lights, and what the check reports

Most interiors are lit by more than one source, and the concurrency test extends to that case in a way that is worth knowing because it is what makes the test practical rather than academic.

With two lamps, every object casts two shadows. The shadow lines of all objects belonging to the first lamp are concurrent at the first lamp’s foot; those belonging to the second are concurrent at the second’s. So the shadows sort themselves into two families, and each family passes the test on its own.

That is a stronger result than it sounds. It means the number of light sources in a scene can be counted from the shadows, their feet located, and each shadow attributed to its source — all with a straightedge, and all from the picture.

Where it fails is with extended sources and with bounced light, which produce shadows too soft to have a definable edge, and with a scene lit mostly indirectly, which has no distinct shadows at all. Those are the cases where the geometry has nothing to say, and it is worth being able to recognise them rather than forcing the construction onto a picture that does not have the structure for it.

Why the shadow’s vanishing point is worth finding

A last practical note, because the construction has a use beyond checking.

Given one correctly drawn shadow, the shadow direction’s vanishing point follows — join the object’s base to the tip of its shadow and extend to the horizon. Every other shadow in the picture then follows from that one point plus the light ray vanishing point, with no further judgement anywhere.

So the whole shadow scheme of a drawing is fixed by two points, and the two points are fixed by one shadow. Drawing that first shadow carefully and constructing the rest is both faster than drawing them all by eye and consistent by construction, which is the combination that almost never happens in this subject.