Atmospheric Optics: Sky Color, Rainbows & Halos · Guide · glidepathscience.org
GuideAtmospheric Optics: Sky Color, Rainbows & Halos
Contents
This Guide explains the ideas and equations behind every Walkthrough step, Concept Challenge question and Predict round. Part 1 prepares the Intro track and Part 2 the Advanced track; each takes about ten minutes. Every number here comes from the sim’s model.
Part 1 · The essentials
Math you’ll need: powers and ratios, the sine of an angle, and the exponential $e^{−x}$.
Why the sky is bright and blue
Sunlight above the air is nearly white. On the Moon, with no air, the sky is black even at noon; the only light from the sky is the Sun itself. On Earth, every molecule of air the sunlight passes sends a little of it off in new directions. That scattered sunlight is the daytime sky.
Molecules, far smaller than a wavelength, favor short waves strongly: the scattering grows as $1/λ^4$ (Rayleigh scattering).
scattering $∝ 1/λ^4$ (particles much smaller than $λ$)
Violet is scattered even more than blue, yet the sky looks light blue. The scattered light is a mix of all colors weighted toward the short end; sunlight carries less violet than blue, and our eyes respond weakly to violet, so the mix looks sky blue.
Air mass and the red Sun
Sunlight from straight overhead crosses one air mass. A lower Sun’s beam slants through more: for flat air about $1/\sin e$ air masses at elevation $e$; because Earth’s air curves away, a little less near the horizon, and about 34 right at it.
$m ≈ 1/\sin e$ (flat air; within 1 % above 20°)
Along the way each color is scattered out of the beam (and some absorbed) in proportion to what is left, so the beam falls off exponentially. With $τ$ a color’s optical depth straight up, the fraction left after $m$ air masses is (Beer–Lambert):
$I = I_0e^{−τm}$ (the direct beam, one wavelength at a time)
Sunset skies, haze and clouds
At sunset the light from near the horizon has crossed the longest paths and lost its blue, so the sky near the Sun and along the horizon turns orange and red. The sky overhead stays blue: its light was scattered from sunlight skimming through the high, thin air.
Haze, smoke and cloud droplets, as large as a wavelength or larger, scatter all colors nearly equally (Mie scattering) and mostly forward, so they add white light, brightest around the Sun: a hazy sky is whiter, and clouds are white.
Other gases, other worlds
Any gas of small molecules gives a blue sky; how bright depends on how strongly the gas bends light (its refractive index) and on how many molecules a column holds. Helium bends light about an eighth as much as air, so helium air at the same pressure would scatter about a tenth as much: a darker blue sky, and sunsets that hardly redden. Carbon dioxide bends light more, and gives a brighter sky.
Mars has thin carbon dioxide, under 1 % of Earth’s pressure, and fine reddish dust. The gas hardly scatters; the dust absorbs blue light, so the daytime sky is butterscotch. Close to the Sun, though, the dust’s grains send blue light into a tighter, stronger beam forward than red, and near sunset the sky around the Sun turns blue. The dust is illustrative.
The rainbow
In a raindrop, sunlight refracts in, reflects once off the back, and refracts out. Rays entering at different heights come out at different angles, but they bunch up near one angle from the antisolar point, the shadow of your head: about 42° for red and 40.6° for violet. Every drop at that angle sends you its light: a circle of color, red outside. The antisolar point is as far below the horizon as the Sun is above it:
top of the bow $=$ bow angle $−$ Sun’s elevation
Light reflected twice inside the drop makes the fainter secondary bow, near 51°, with its colors reversed. Between the bows almost no once- or twice-reflected light leaves the drops toward you, so the sky there is darker: Alexander’s dark band.
Halos and sun dogs
Thin cirrus clouds are made of tiny hexagonal ice prisms. Light entering one side face and leaving by the next-but-one crosses a 60° wedge of ice, and is turned by at least the minimum deviation:
$D = 2\arcsin(n \sin 30°) − 60°$ (rays crossing the prism square to its edge)
With ice’s index near 1.31 that is about 22°: no light is turned less, so a bright ring surrounds the Sun at 22°, red on its inner edge, with a darker sky inside. Light through a side face and an end face crosses a 90° wedge, which turns it by at least 46°: the fainter 46° halo.
Flat plates float with their faces level, like falling leaves, and send light through the same 60° wedges only sideways: bright sun dogs on either side of the Sun, at its elevation. With the Sun on the horizon they sit on the 22° halo; as the Sun climbs they move out, and above about 61° there are none.
Part 2 · Going further
Math you’ll need: exponentials, square roots and inverse trigonometric functions; derivatives for the minimum of $D$; Airy’s integral appears as a named function.
The cross section and the column
For molecules much smaller than the wavelength, the cross section follows from the refractive index $n_s$ of standard air (Peck and Reeder), its number density $N_s$ = 2.546899 × 10¹⁹ cm⁻³, and the King factor $F_K$, about 1.05, for the molecules’ anisotropy (Bates):
$σ = \dfrac{24π^3}{λ^4N_s^2}\left(\dfrac{n_s^2 − 1}{n_s^2 + 2}\right)^2F_K$
At 550 nm that gives 4.51 × 10⁻²⁷ cm², within 0.1 % of Bucholtz’s tabulated fit. The column of molecules over each square centimeter balances the surface pressure, and the optical depth straight up is the cross section times the column:
$τ = σP/(\bar m g)$
The density falls as $e^{−z/H}$ with the scale height $H = kT/(\bar m g)$, 8.43 km for isothermal air at 288 K. Around a planet of radius $R$, a horizontal path crosses, to first order (Chapman),
$m_{hor} ≈ \sqrt{πR/(2H)}$
about 34 for Earth.
Single scattering and its limits
The sky’s radiance in a direction is the sunlight scattered once at each point along the line of sight: at each point, the sunlight that has survived its own slant path, times the molecules’ and particles’ scattering there and their phase functions ($\tfrac{3}{16π}(1 + \cos^2Θ)$ for molecules, Henyey–Greenstein for particles), dimmed again on the way to you. The planet’s shadow is included.
Light scattered twice is a fraction of order $τ$ of the once-scattered light. Earth’s clear sky, $τ$ ≈ 0.1–0.4, is a good case. Thick haze, clouds, Titan’s haze and Venus’s 92 bar of carbon dioxide (a Rayleigh optical depth near 16 at 550 nm, before its clouds) are outside its range, and the screen says so. There almost all the light has been scattered many times; the Sandbox estimates it with a two-stream solution for the whole column, spread evenly over the sky: roughly the right brightness and color, not the pattern.
Ozone, twilight and color
After sunset, the zenith’s light has crossed a very long, high path, along which molecules alone would leave it yellowish gray. Ozone’s weak Chappuis band absorbs orange and red, most strongly near 603 nm (5.15 × 10⁻²¹ cm² at room temperature), and along that path it keeps the twilight zenith deep blue: the blue hour, as Hulburt explained in 1953. With no ozone, the model’s twilight zenith turns pale.
The model turns each spectrum into a color with the CIE 1931 color-matching functions, $X = \int L(λ)\bar x(λ)\,dλ$ and likewise $Y$ and $Z$, which encode the eye’s three cone responses: any two spectra with the same $X$, $Y$, $Z$ look alike. The screen’s sRGB follows from a fixed matrix, balanced so that sunlight above the air is white.
Gases and dust
At a fixed pressure and gravity, $τ ∝ (n − 1)^2F_K/\bar m$: carbon dioxide, with 1.53 times air’s refractivity, a King factor of 1.15 and heavier molecules, gives 1.69 times air’s optical depth; pure nitrogen, 1.06 times; helium, 0.10. Mars’s column is so small that its gas’s optical depth is 0.0027, against about 0.5 for its dust.
The dust’s single-scattering albedo $ω(λ)$ and asymmetry $g(λ)$ both depend on wavelength in the model: blue is absorbed more (lower $ω$) but scattered into a sharper forward peak (higher $g$). Away from the Sun, the Henyey–Greenstein factor $(1 − g^2)/(1 + g^2)^{3/2}$ favors red; near it, $(1 + g)/(1 − g)^2$ favors blue.
Descartes, Airy and the polarized bow
After $k$ internal reflections a ray of impact parameter $b = \sin i$ (in drop radii) is turned by $D = 2(i − r) + k(180° − 2r)$, with $\sin i = n\sin r$. Setting $dD/di = 0$ gives the rainbow ray:
$\cos^2 i = (n^2 − 1)/(k(k + 2))$
The primary ($k$ = 1) sits at $180° − D$ from the antisolar point, the secondary ($k$ = 2) at $D − 180°$. Water’s index (Daimon and Masumura) falls from 1.3436 at 400 nm to 1.3305 at 700 nm, so the primary runs from 40.57° (violet) to 42.44° (red) and the secondary from 50.24° (red) to 53.62° (violet).
Near the rainbow ray the outgoing wavefront is a cubic, and its waves interfere. Airy’s theory gives $I ∝ \mathrm{Ai}^2(−z)$ with $z = Δ(2x^2/D″)^{1/3}$, where $x = 2πa/λ$, $Δ$ is the deviation past the minimum and $D″ = d^2D/db^2$. The maxima of $\mathrm{Ai}^2(−z)$, at $z$ = 1.019, 3.248, 4.820…, are the bow, a little inside Descartes’s angle, and the supernumerary bows inside it:
$Δθ = (z_2 − z_1)(D″/(2x^2))^{1/3}$
The spacing goes as $(λ/a)^{2/3}$: a spread of drop sizes washes the fringes out, and fog droplets of 10–20 µm make a broad, nearly white fogbow. Airy’s theory is rough for drops that small; Mie theory is exact. The rainbow ray also reflects inside close to Brewster’s angle, so by Fresnel’s equations the primary is 93 % polarized along the arc (the “96 %” often quoted is the share of its light polarized that way) and the secondary 81 %: a polarizer turned across the bow nearly erases it.
Bravais’s index and the arcs
A ray inclined at $e$ to a prism’s principal plane refracts in that plane as if the index were
$n′ = \sqrt{n^2 − \sin^2 e}/\cos e$
keeping its inclination. For level plates the Sun’s elevation is that inclination, so the sun dogs sit at the minimum deviation with $n′$, $Δa = 2\arcsin(n′/2) − 60°$ in azimuth, and at the angular distance $\cos γ = \cos^2 e\cos Δa + \sin^2 e$. When $n′$ reaches 2, at $\sin^2 e = (4 − n^2)/3$, about 60.7°, no ray gets out.
Light entering a plate’s top face and leaving a side face makes the circumzenithal arc; by Snell’s law at each face,
$\sin h = \sqrt{n^2 − \cos^2 e}$
which needs $\cos^2 e > n^2 − 1$, a Sun below 32.0° at 550 nm (32.7° for red). Light entering a side face and leaving the bottom makes the circumhorizontal arc, at $\sin h = \sqrt{1 − n^2 + \sin^2 e}$, with the Sun above 58.0°.
Reference
Common mistakes
Part 1
- Thinking the sky reflects the ocean, or that sunlight is blue: the sky is sunlight scattered by air.
- Using $1/λ$ or $1/λ^2$: Rayleigh scattering goes as $1/λ^4$.
- Thinking the setting Sun is farther away: its beam crosses more air.
- Using $1/\sin e$ right down to the horizon, where it blows up: Earth’s air curves away.
- Measuring the rainbow from the Sun: it is 42° from the antisolar point, opposite the Sun.
- Calling sun dogs reflections: they are refracted, through 60° of ice.
Part 2
- Forgetting that, at one pressure, heavier molecules mean fewer of them in the column.
- Trusting single scattering where $τ ≳ 1$: under clouds, on Titan or Venus.
- Stopping at the azimuth $Δa$ for the sun dogs: the angular distance is smaller.
The equation sheet
| Part 1 | |
|---|---|
| scattering | scattering $∝ 1/λ^4$ |
| Beer–Lambert | $I = I_0e^{−τm}$ |
| air mass | $m ≈ 1/\sin e$ |
| the bow | top of the bow $=$ bow angle $−$ Sun’s elevation |
| halo | $D = 2\arcsin(n \sin 30°) − 60°$ |
| Part 2 | |
|---|---|
| cross section | $σ = \dfrac{24π^3}{λ^4N_s^2}\left(\dfrac{n_s^2 − 1}{n_s^2 + 2}\right)^2F_K$ |
| optical depth | $τ = σP/(\bar m g)$ |
| horizon | $m_{hor} ≈ \sqrt{πR/(2H)}$ |
| rainbow ray | $\cos^2 i = (n^2 − 1)/(k(k + 2))$ |
| supernumeraries | $Δθ = (z_2 − z_1)(D″/(2x^2))^{1/3}$ |
| Bravais | $n′ = \sqrt{n^2 − \sin^2 e}/\cos e$ |
| circumzenithal arc | $\sin h = \sqrt{n^2 − \cos^2 e}$ |
$λ$ wavelength, $τ$ optical depth straight up, $m$ air mass, $e$ the Sun’s elevation, $I_0$ the light above the air, $n$ a refractive index ($n_s$ standard air’s, $n′$ Bravais’s), $N_s$ standard air’s number density, $F_K$ the King factor, $P$ surface pressure, $\bar m$ molecular mass, $g$ gravity, $H$ scale height, $R$ the planet’s radius, $i$ and $r$ the angles of incidence and refraction, $k$ the internal reflections, $D$ the deviation ($D″$ its second derivative in $b$), $a$ the drop radius, $x = 2πa/λ$, $z_1$, $z_2$ Airy’s maxima, $h$ an arc’s elevation.
Sources and further reading
A. Bucholtz, Applied Optics 34, 2765 (1995) and B. A. Bodhaine et al., J. Atmos. Oceanic Technol. 16, 1854 (1999), for Rayleigh scattering; E. R. Peck and K. Reeder, J. Opt. Soc. Am. 62, 958 (1972); D. R. Bates, Planet. Space Sci. 32, 785 (1984); ASTM G-173-03 for sunlight; Serdyuchenko et al. (2014) for ozone; Hulburt (1953); M. Daimon and A. Masumura, Applied Optics 46, 3811 (2007), for water; S. G. Warren and R. E. Brandt, J. Geophys. Res. 113, D14220 (2008), for ice; OpenStax University Physics Volume 3, Chapter 1, “The Nature of Light” (CC BY-NC-SA 4.0), as further reading. The Field Manual lists what the model leaves out.
Atmospheric Optics: Sky Color, Rainbows & Halos v1.2 · © 2026 Dr. David Meier · CC BY-NC-SA 4.0 · glidepathscience.org