Optics of the open air · a ray tracer you can drive
Light Leans Toward the Cold
The water on a hot road is the sky. Every mirage runs on one rule: light curves toward colder, denser air. Over hot tarmac the cold is on top, so rays bend up and the road shows you the sky, and an upside-down copy of the car ahead. Over a cold sea the cold is underneath, so rays bend round the curve of the Earth and a ship below the horizon rises into view, or stretches into the walls of a Fata Morgana. This page traces the rays itself, one per row of pixels, through a round Earth and real air, and draws what your eye would see. Then it takes the most extreme mirage on record: on 24 January 1597 Barentsz’s stranded crew saw the Sun when its centre was 5°26′ below the horizon, two weeks before it was due. A modest 6 K inversion does it, but only if it runs unbroken for about 500 to 560 km.
Look down a straight road on a hot afternoon and, a few hundred metres ahead, the tarmac turns to water. It shines, it ripples, it holds an upside-down copy of the car coming towards you, and however far you drive it stays the same distance away. There is no water. The shining patch is the sky. Every mirage there is, from that road to the ghost ships of the Arctic, comes from one rule:
light curves toward colder airbecause colder air, at the same pressure, is denser
Air slows light by a tiny amount, about three parts in ten thousand, and the amount is proportional to its density. So the refractive index of air is n = 1 + c·P/T, with pressure P and absolute temperature T. Where the temperature changes with height, one side of a travelling wavefront is always in slightly slower air than the other, and the ray bends toward the slow side. For a ray that is nearly level, the bending works out to
curvature = 503 · P/T² · (0.0343 + dT/dz) ÷ REarthP in hPa, T in kelvin, dT/dz in K per metre
which is the form surveyors use (Hirt and colleagues, 2010, write it in exactly these numbers, and the engine on this page reproduces their 503 and their 0.0343). The 0.0343 is pressure falling with height, which bends every ray gently downward. The dT/dz is the weather. When the air gets warmer with height (an inversion, cold below) the ray bends down harder, toward the cold. When the air gets colder with height very fast (a hot surface, cold above) the bracket goes negative and the ray bends up, toward the cold. That is the whole physics. The rest is geometry, and the geometry is strange enough that it is better watched than described.
1. The bench
Below, every row of pixels in the picture is one ray, fired from your eye at that exact angle and traced step by step through the air you choose, over a round Earth, until it meets the target, the ground, or the open sky. Nothing is painted in afterwards: the picture is whatever the rays land on. It is drawn at true angular proportions, so a pixel across is the same angle as a pixel down, and the whole frame is under a degree tall: roughly what a pair of binoculars shows.
The bench · one ray per row of pixels, traced through the air you set
What the eye sees · true angular proportions
Side view · 25 of the rays
The air · temperature against height
Green bands: rays bend more tightly than the Earth (k > 1). Pink: rays bend upward (k < 0).
Things worth trying, in this order.
Hot road. The road surface air is 18 K hotter than the air a metre up, and the extra heat fades within a few centimetres. Rays aimed slightly downward curve back up before they reach the tarmac, so the band just below the far road shows sky, and below the car sits a second, inverted car. The readout counts the images; the side view shows the rays that make the lower one skimming the road and lifting off. Now drag the target distance down: the inverted car shrinks and disappears as the car comes closer than the edge of the mirage. Drag the surface layer to zero and there is no water at all.
Cold sea. A ship 30 km away, seen from 10 m up, over sea air at 0 °C with a 5 K inversion around 40 m. Compare it with No mirage, the same ship in a standard atmosphere, where the Earth's curve hides the hull and everything up to mid-sail: the ship is “hull down”. In the cold air the same ship has risen, and mid-sail is back in view (the readout says which parts are). This is the old sailors' looming. Light bending round the Earth lifts what should be hidden.
Fata Morgana. Lower the eye to 3 m and put a sharp 3 K inversion at 10 m. Now some rays are trapped between the inversion and the sea, and many different angles land on the same few metres of the ship's hull. That thin strip is stretched into a sheer wall, the “castles” that the Strait of Messina's mirages are named for (la Fata Morgana, Morgan le Fay, whose sorcery local folklore blamed for them). Watch the readout: the same part of the ship can be seen several times, some copies upside down.
The panel on the right is the air itself. The green bands mark heights where a level ray bends more tightly than the Earth does; that is where light can be trapped. The next section is about that threshold.
2. Why the water always retreats
The road mirage has a hard floor. A ray leaving your eye downward at angle θ keeps the quantity n·r·cosθ fixed as it goes (Bouguer's rule, which is Snell's law for layers wrapped round a sphere; the bench checks it on every ray, and prints how well it held). It can only turn back before the road if the air at the road is thin enough, which works out to
θ < arccos(nroad / neye) ≈ √(2 Δn)
Steeper rays hit the tarmac and you see tarmac. Shallower rays turn, and you see sky. So the water occupies a band of fixed angle below the horizon, never deeper than that limit, and on flat ground a fixed angle below eye level is a fixed distance ahead: eye height divided by the angle. Walk forward and the band walks with you. That is why you never reach the puddle. The table is computed live from the same engine, for air at 30 °C:
| Road air excess | Eye height | Deepest reach of the mirage | Where the water starts |
|---|
A few tenths of a degree at most, and only a few hundred metres ahead: that matches what people see, and it matches Minnaert's classic field notes, where over meadows a 3° temperature difference between the ground and about a metre up gave “little or no reflection” and 8° made it “strongly marked”, with angles up to about 1° over the hottest beach sand. The model's simple layer (the excess halving about every 5.5 cm) is our choice, not a measurement, and a real road's air flickers; the ceiling on the angle depends only on the temperature difference, not on the layer's shape, which is why it is worth trusting.
3. The gradient that makes the Earth flat
Surveyors describe refraction with one number, k: how curved a level ray is, as a fraction of the Earth's own curvature. Carl Friedrich Gauss measured about 0.13 near Hannover, and that figure is still the surveyor's default. The standard atmosphere, cooling 6.5 K per kilometre, gives k = 0.17 at sea level (the verifier gets 0.170, and Hirt et al. give +0.17 for their own standard case). Light over ordinary ground bends about a sixth as much as the Earth does, which is why you can see a little past the geometric horizon.
Now make the air warmer with height. At some gradient the ray bends exactly as much as the Earth: k = 1, and light runs parallel to the sea all the way round. The Earth is then optically flat, and beyond that point it is optically a bowl. The critical gradient is
dT/dz = T² / (503 P) − 0.03430.112 K/m at 0 °C · 0.129 K/m at 15 °C · 0.082 K/m at −30 °C
The textbook “about 0.11 °C per metre” (Wegener gave 0.114 in 1918, Lehn tabulates 0.112 at 273 K) is the freezing-point value, and the formula shows why cold places are where light gets trapped: the colder the air, the gentler the inversion that does it. The verifier traces a level ray for 200 km through air held at k = 1 and it stays within centimetres of its starting height; in ordinary air the same ray ends up 2.6 km above the sea.
4. Fourteen days too soon
In the winter of 1596 to 1597, Willem Barentsz's ship was frozen in on the northeast coast of Novaya Zemlya and the crew wintered ashore in a hut they named Het Behouden Huys (House of Safety), at 76°15′ N. One of the crew, Gerrit de Veer, kept the journal. This is the English of 1609, as printed by the Hakluyt Society in 1876:
“The 24 of January it was faire cleare weather, with a west wind. Then I and [the captain], and another with vs, went to the sea-side on the south side of Noua Zembla, where, contrary to our expectation, I [the] first [of all] saw the edge of the sun; wherewith we went speedily home againe, to tell William Barents and the rest of our companions that joyfull newes. But William Barents, being a wise and well experienced pilot, would not beleeve it, esteeming it to be about fourteene daies too soone for the sunne to shin in that part of the world”
Gerrit de Veer, The Three Voyages of William Barents to the Arctic Regions, Hakluyt Society, 2nd ed. 1876, pp. 143–144. Square brackets are the 1876 editor's, except [the captain], which is ours: it stands in for Jacob van Heemskerck, whose name the scanned text renders unreliably.
Barentsz was right about the astronomy. On 24 January 1597 the centre of the Sun never rose higher than about 5½° below the horizon at the hut; JPL's ephemeris and this page's own solar model agree on that to a few thousandths of a degree, and van der Werf and colleagues (2003) give 5°26′. Ordinary refraction lifts the Sun's image by well under a degree, and the verifier's arctic air (−30 °C at the ice) first shows its upper edge on 9 February; Barentsz expected it on the 8th. On 27 January, with the Sun's centre still 4°41′ down, the whole crew saw it “in his full roundnesse”. For centuries the observation was doubted: had the crew lost count of the days, or simply got it wrong? (If their dates had been in the old Julian style, 24 January would be 3 February in ours, and the depression only 2.75°. Van der Werf and colleagues showed the journal consistently used the new Gregorian calendar.)
In 1979 Waldemar Lehn showed how it could be true. What is needed is not a monstrous inversion: in his words, “an inversion of magnitude 6°C with maximum temperature gradient of 0.2°C/m is quite adequate. The most difficult of the conditions to be met is the vast uniform expanse of atmosphere, with inversion everywhere the same.” Light slightly below the thermocline bounces back from it, again and again, and is carried round the curve of the Earth for hundreds of kilometres before the layer ends and it can climb out toward the Sun.
The instrument below is Lehn's recipe, built independently on this page's engine: a thermocline of +6 K centred 30 m above the ice, steepest gradient 0.2 K/m, which simply stops at the distance you choose. Move the date. Turn the thermocline off. Then move where it ends.
January 1597 · the Sun from Het Behouden Huys, 76°15′ N
What the eye sees at noon · 48 arcminutes of sky, true proportions
Where each ray came from · apparent elevation (up) against true elevation (across)
Each dot is one traced ray. Its height is where you see it; its position across is the true direction the light came from, in degrees above or below the airless horizon. The gold band is the Sun's disc on the chosen date. Where the dots cross the band, you see the Sun.
What the model finds, and the verifier confirms: on 24 January, ordinary air shows nothing. With Lehn's thermocline, the Sun appears only if the layer runs somewhere between about 500 and 560 km, and then it is not a disc. It is a flat bright strip about 6.6 arcminutes tall (a whole Sun is 32.5), sitting in a narrow window of sky with dark bands above and below it where the rays end on the ice. That is Lehn's description (“a narrow strip or window appears near the horizon, with or without an image of the sun in the window”), arrived at by a different program. In his own reconstruction, the ray to the Sun's centre grazes the Earth about 540 km from the observer. The strength of the inversion barely matters; the length of it is the whole story. Make it too short and the rays escape early and come from nearer the horizon; make it too long and they come from deeper than the Sun.
The last doubt went in 2003. The crew had also timed a conjunction of the Moon and Jupiter to fix their longitude, and got it wrong by 29°. Van der Werf, Können, Lehn and colleagues showed that the same mirage had shifted the two bodies' apparent positions so the conjunction looked about two hours late, which largely explains the error. The observation that had been used to accuse the journal turned out to be a second measurement of the mirage. In their words: “The truthfulness of these observations, debated for four centuries, now appears to be beyond doubt.”
5. What this model is, and is not
- The air is layered, not weather. Temperature depends on height only (and, in the 1597 instrument, on whether you are inside the layer's extent). Real mirages shimmer because the layers are turbulent and uneven; this page shows the average geometry, not the flicker. The profiles (a surface layer fading exponentially, an inversion shaped like a logistic step) are our choices, stated in the engine; only the Lehn thermocline's size is taken from a source.
- Dry air, one colour. The refractive index is Ciddor's 1996 formula for dry air at 550 nm, scaled with density. Humidity is ignored. Dispersion (why the green flash is green) is left out.
- Rays, not waves. Geometric optics, which is accurate for everything here. The step-by-step tracing is checked against Bouguer's invariant on every ray, against step-size changes, and against an almanac refraction formula.
- Colours are schematic. Where each ray lands is computed; how bright the sky is there is not. The glow around the 1597 Sun is a rule of thumb (sky light is drawn brighter the nearer its source is to the Sun), and the ice and sea are flat colours.
- The edge of the thermocline is sharp. Lehn's model also has a “critical distance”. A real inversion fades out unevenly, which would spread the range of distances that work. The 500 to 560 km figure belongs to this model, not to the sky over the Barents Sea in 1597, which nobody measured.
6. The check
The page runs engine.mjs, and the verifier runs the same file (it fails if the two copies ever differ by a byte). It holds the engine against published values wherever one exists: Ciddor's refractivity, van der Werf and colleagues' refraction constants (agreement to 0.25%), Lehn's own constants and his Table 1, Hirt et al.'s refraction coefficient, Bennett's almanac refraction formula from the horizon to 45° (within 3.5%; the gap is largest at 45°, where the traced value matches the exact local-index limit to 0.5%, so the residual is in the refractivity value, not in the tracing), Meeus's worked solar example, and 3,456 epochs of JPL Horizons ephemeris for the hut in January and February 1597. Output of the last run:
PASS the page ships a byte-identical copy of this engine : 18149 bytes PASS Ciddor (1996) eq. 1, standard dry air at 550 nm: n - 1 = 2.778e-4 : 2.7784e-4 PASS c in n - 1 = c P/T matches van der Werf et al. (2003) at 520, 580, 650 nm to within 0.3% : worst difference 0.248% PASS and matches Lehn (1979), eps * beta = 7.89e-5 K/hPa : engine 7.9012e-5, Lehn 7.8874e-5 PASS the engine's curvature law is Hirt et al.'s: c * R_earth = 503 : 503.4 PASS and its pressure term g M / R = 0.0343 K/m : 0.03416 PASS k = +0.17 for Hirt et al.'s standard case : 0.1729 PASS the standard atmosphere (-6.5 K/km) at sea level gives k = 0.17, not the surveyor's 0.13 : 0.1699 PASS critical inversion at 0 C, 1013 hPa: 0.112 K/m (Lehn 1979: 0.112) : 0.1121 K/m PASS it depends on temperature: 0.129 K/m at 15 C, 0.082 K/m at -30 C : 0.1286, 0.0818 PASS Lehn's Table 1 at 0.112 K/m: k = 0.87 at 293 K, 1.37 at 233 K : 0.868, 1.373 PASS at k = 1 a level ray holds its height for 200 km: the Earth looks flat : moves -0.04 m at 0.1196 K/m (ordinary air: rises 2568 m) PASS Bouguer's invariant n r cos(th) is conserved along every ray in every preset : worst drift 3.2e-10 PASS the answer does not depend on the step size : largest change: road 2.0e-8 m, sea 6.4e-8 m (nonzero, so the two runs really differed) PASS traced refraction from horizon to 45 deg agrees with Bennett's formula within 3.5% : 0° 33.86'/34.48', 0.5° 28.31'/28.75', 1° 24.06'/24.33', 2° 18.12'/18.22', 5° 9.81'/9.88', 10° 5.29'/5.39', 20° 2.63'/2.70', 45° 0.96'/0.99' PASS at 45 deg it equals the local-index limit (n0 - 1) tan z, as it must : 57.8" vs 58.1" PASS the deepest mirage ray: traced boundary matches arccos(n_road / n_eye) : traced 18.84', closed form 18.68' PASS hot-road preset: the car's headlamps are seen twice, once upside down : 2 images, 1 inverted PASS solar model reproduces Meeus example 25.a : dec -7.78507, RA 198.38083 PASS solar model agrees with JPL Horizons at the hut, 1597 Jan 20 to Feb 12 : 3456 epochs, worst 0.0033 deg PASS 24 Jan 1597: the Sun's centre was 5 deg 26 min below the horizon (van der Werf et al. 2003) : -5.446 deg PASS 27 Jan 1597: 4 deg 41 min below (same source) : -4.692 deg PASS had the dates been Julian (24 Jan O.S. = 3 Feb N.S.) the depression would be far smaller : -2.75 deg PASS in ordinary arctic air the lowest sight line reaches 0.8 deg below the horizon : -0.818 deg PASS so the Sun's upper limb first shows within a day of 8 February, the date Barentsz expected : 9 February PASS the thermocline used is Lehn's: +6 K, steepest gradient 0.2 K/m : 0.194 K/m PASS on 24 January that layer shows the Sun only if it runs about 500 to 600 km : visible for extents 500 to 560 km PASS at 540 km the Sun is a strip a few arcminutes tall (a whole Sun is 32.5) : 6.6 arcmin tall, light ran up to 567 km under the layer PASS and it sits in a window with dark bands above and below it, Lehn's "narrow strip" : dark above: true, dark below: true 29/29 checks pass
The verifier: research/light-leans-toward-the-cold/verify.mjs · the engine it tests, which is also the one this page runs: engine.mjs.
Sources
- W. H. Lehn, “The Novaya Zemlya effect: An arctic mirage”, J. Opt. Soc. Am. 69, 776–781 (1979), doi:10.1364/JOSA.69.000776.
- S. Y. van der Werf, G. P. Können, W. H. Lehn, F. Steenhuisen, W. P. S. Davidson, “Gerrit de Veer's true and perfect description of the Novaya Zemlya effect, 24–27 January 1597”, Applied Optics 42, 379–389 (2003). Source of the hut's position, the 5°26′ and 4°41′ depressions, the expected date of 8 February, the calendar argument and the conjunction.
- S. Y. van der Werf, G. P. Können, W. H. Lehn, “Novaya Zemlya effect and sunsets”, Applied Optics 42, 367–378 (2003). Source of the refraction constants A.
- Gerrit de Veer, The Three Voyages of William Barents to the Arctic Regions, trans. William Phillip (1609), Hakluyt Society 2nd ed., ed. K. Beynen (1876).
- C. Hirt, S. Guillaume, A. Wisbar, B. Bürki, H. Sternberg, “Monitoring of the refraction coefficient in the lower atmosphere using a controlled setup of simultaneous reciprocal vertical angle measurements”, J. Geophys. Res. 115, D21102 (2010), doi:10.1029/2010JD014067. Source of the k formula, Gauss's 0.13 and the standard +0.17.
- P. E. Ciddor, “Refractive index of air: new equations for the visible and near infrared”, Applied Optics 35, 1566–1573 (1996).
- A. T. Young, “Ray bending” and “Fata Morgana”, pages at aty.sdsu.edu. Source of the Wegener and de Graaff Hunter critical gradients and the origin of the name Fata Morgana.
- M. Minnaert, The Nature of Light and Colour in the Open Air (Dover, 1954), §32.
- G. G. Bennett, “The calculation of astronomical refraction in marine navigation”, Journal of Navigation 35 (1982), as given in J. Meeus, Astronomical Algorithms, 2nd ed. (1998), ch. 16; the solar model is Meeus ch. 25.
- JPL Horizons, Sun (10) from geodetic 68°18.6′ E, 76°15.4′ N, airless apparent elevation, 1597 January 20 to February 12 at 10-minute steps; the raw response is committed next to the verifier.