Physics guide
What is drawn
Sunlight (or moonlight) passes through a thin cloud and is scattered once by its drops. The brightness seen in a direction is proportional to the cloud's phase function p(Θ) at the scattering angle Θ between the incoming light and the line of sight (Chapter 12, "The Scattering Phase Function"; Θ = 0 is straight ahead). The app computes p(Θ) from Mie theory at a series of wavelengths for a lognormal distribution of drop radii, weights each wavelength by the sun's spectrum and the eye's colour response, and draws the result. The cloud's thickness and the source's brightness only multiply the whole picture.
The three phenomena differ in where you look. A corona is centred on the source, Θ = α, the angle from the source. A glory and a rainbow or fogbow are centred on the antisolar point, the point opposite the source, which is where your own shadow falls; there Θ = 180° − α.
Corona: diffraction rings
For drops large compared with the wavelength, the light that passes around a drop is diffracted into the Airy pattern of a circular disc, p(Θ) ≈ 2x² [J₁(xΘ)/(xΘ)]², with x = 2πr/λ (the dashed curve in the plot, for one drop size). Its dark rings fall where xΘ = 3.832, 7.016, 10.173, and its bright rings where xΘ = 5.136, 8.417, 11.620. Because the angles are proportional to λ/r, red light's rings are about 1.4 times larger than blue light's, so each bright ring is blue on the inside and red on the outside. Smaller drops give a bigger corona.
This holds for one size of drop. If the drops differ by 10 % in radius, the rings of different drops fall at angles that differ by 10 %, and the outer rings, which sit at larger angles, are smeared first. Raise the width σ/r and watch the rings fade from the outside in, leaving only the aureole. Real clouds commonly have σ/r of 0.2 to 0.4, which is why the aureole is usually all that is seen, and why a vivid corona is a sign of an unusually uniform cloud. Chapter 13, "Corona", shows a photograph.
Glory: backscattering
Light returned almost exactly toward its source is enhanced by waves that travel around the drop's surface and by rays that enter off-centre and are reflected once inside. Neither is described by simple ray tracing, so the glory has to be computed from Mie theory. The result is a bright centre with coloured rings whose spacing is roughly λ/2r, about 1.6° for 10 µm drops. As with the corona, the rings are most vivid when the drops are nearly the same size; the red of each ring lies outside its blue. Chapter 13, "Glory", describes the airplane and mountain-top sightings.
Rainbow and fogbow
Rays entering a drop and reflected once inside pile up near the scattering angle of the Descartes rainbow, 137.9° for water, which is 42.1° from the antisolar point (Chapter 5 traces the rays; the ray tracer app shows them). Because n depends on wavelength, red's bow (42.3°) lies outside violet's (about 41°). Two reflections give the secondary bow near 51°, with the colours reversed, and between the bows lies Alexander's dark band, where no ray is scattered. The Descartes angles are marked in the plot.
Geometric optics describes drops much larger than the wavelength. For the smaller drops the bow is broadened by diffraction and its peak moves inward. At 10 µm each colour's bow is wider than the whole spectrum's spread, so the colours overlap into a nearly white fogbow. At 50 to 100 µm the colours separate and extra supernumerary arcs appear just inside the primary bow; they too wash out if the sizes are very unequal. Raindrops of 0.5 to 1 mm are beyond what this app can calculate in a useful time, but for them the bow approaches the Descartes angle and the supernumeraries are very closely spaced.
The picture assumes a rainfall that fills the whole view, down to the horizon; below the horizon the ground hides it. A bow is a circle about the antisolar point, so the higher the sun, the lower the bow's top: a sun more than 42° up gives no primary bow above the horizon.
Why one size of drop matters
Ring and bow patterns come from interference, and where a bright ring falls depends on the drop's size. Averaging over many sizes averages many shifted patterns. The app integrates the Mie result over the lognormal distribution you set, and the Numbers panel shows the model's ring angles next to those for one drop size. Use "Compare two clouds" to pin a narrow cloud and set a broad one beside it.
The sun's finite size
The sun and moon are discs 0.53° across, not points. Every point of the disc makes its own corona, glory or bow, shifted by up to 0.27° in angle. The brightness seen is the average of the point-source result over the disc. This fills in the dark rings and rounds off the sharp peaks, most of all for large drops, whose rings are only a few tenths of a degree wide. A drizzle bow's supernumerary arcs, for example, are much fainter and broader than the point-source calculation shows, and in a real rainbow the width of the sun limits how sharp the bow's edge can be. The calculation averages the phase function over a uniformly bright disc; the plot's dotted line shows the point-source value at 0.55 µm for comparison. The sun's real brightness drops toward its edge by about a third, so the true blurring is slightly smaller than this.
Colour
The phase function is computed at wavelengths from 0.38 to 0.74 µm (every 0.015 µm for the corona and glory, 0.03 µm for the rainbow) and joined linearly between them. Each is weighted by the ASTM E-490 solar spectrum and the CIE 1931 colour-matching functions and converted to sRGB. The white balance is set so that a cloud scattering all directions and colours equally would be grey, as a camera set to daylight would show it. Very bright colours are compressed toward white, as a camera or the eye would. The moon's light has the same colour as the sun's for this purpose.
What this app leaves out
- Multiple scattering. In a thick cloud, light scattered more than once fills in the rings and the dark band between bows. A corona therefore needs a thin cloud, as does a glory seen through a cloud thinner than a few optical depths.
- Polarization. Rainbows and glories are strongly polarized; the app shows total intensity of unpolarized light.
- Ice. The rings of a corona can come from ice crystals as well, and halos are made by refraction in ice crystals, which are not spheres.
- Raindrops. Rain is not a sphere: drops over about 1 mm are flattened, which moves the bow. Drops of rain size are also beyond this app's radius range.
- The cloud's size distribution is taken as lognormal, and the water's temperature as 10 °C.
- The sun's or moon's disc is treated as uniformly bright, which ignores its limb darkening. Switch off "Allow for the sun's finite size" to see the point-source result.