What an aurora is. Electrons (typically 1-20 keV) guided by the geomagnetic field hit the thermosphere at 90-300 km and excite oxygen and nitrogen. The light comes from fixed atomic and molecular transitions, so colour is a function of altitude and composition.
Penetration depth. An electron of energy E stops after a column mass R. The Gruen range is R(E) = 4.57e-5 E^1.75 kg/m2 (E in keV) The model deposits energy with a simple shape dE/dm = (E/R) lambda(y), lambda(y) = 15/4 y sqrt(1-y), y = m(z)/R and the column mass above altitude z, m(z), comes from the integral of the US Standard Atmosphere 1976 density. The integral of lambda over y is 1, so the model conserves energy (check 1). 10 keV electrons peak near 100 km, 1 keV electrons near 150 km.
Emission lines. Production follows the deposited energy (35 eV per ion pair) times the species abundance; the excited states then either radiate or are quenched by collisions:
eff(z) = A / (A + sum k_i n_i)
- 557.7 nm green, O(1S), lifetime 0.74 s: only slightly quenched above about 100 km, so it peaks at 100-150 km.
- 630.0 nm red, O(1D), lifetime about 110 s: quenched by N2, O2 and O below about 200 km, so it only shines high up and needs soft electrons that stop there.
- 427.8 nm blue-violet (N2+) is prompt (no quenching) and follows nitrogen, so it sits at the lower border; the pink fringe is the N2 first positive band, here given a simple altitude weight.
Dipole field and motion. A dipole line obeys r = L R_E cos^2(lambda), B = (B0/L^3) sqrt(1+3 sin^2 lambda) / cos^6 lambda A charged particle gyrates at omega = eB/(gamma m) with radius r_g = gamma m v_perp / (eB), bounces between mirror points because mu = m v_perp^2 / (2B) is conserved, and drifts around the Earth. The bounce period is integrated with RK4 and compared with the Schulz-Lanzerotti fit T = 4 L R_E / v (1.3802 - 0.3198 (sin a + sqrt(sin a))). A particle whose equatorial pitch angle is below the loss cone, sin^2 a_LC = B_eq / B(100 km), reaches the atmosphere: that is the auroral precipitation (about 2.5 degrees at L = 6.6).
Space weather. Solar-wind coupling uses the Newell function v^(4/3) B_T^(2/3) sin^(8/3)(theta/2) (theta is the IMF clock angle); the magnetopause stand-off is the Shue (1998) formula. Kp from coupling uses a rough logarithmic fit, and the arc latitude 70 - 1.7 Kp degrees is a rule of thumb: illustrative, not a forecast.
The picture. (Night sky view.) Each curtain is a vertical sheet at a distance set by the arc latitude minus your latitude (111.2 km per degree). The page intersects each pixel ray with a folded sheet, converts the hit point to altitude on a sphere of radius 6371 km and reads the colour from a table built by the emission model, so changing electron energy really changes colour and height. Ray streaks, fold motion and patches are procedural; the lake reflects the same sky.
Honest simplifications. Energy-deposition shape, ion-pair efficiency, atomic-oxygen fraction and the calibration to typical brightness (about 1 kR of 557.7 nm per mW/m2 at 3 keV) are simplified stand-ins for full transport codes and MSIS; absolute brightness and the pink/blue ratio are indicative only. Curtains are modelled as flat sheets, not along the true curved field direction. Gyration is drawn exaggerated; drift is not animated.
Live checks. (1) energy conservation of the deposition grid, (2) peak depth of 10 keV electrons, (3-4) Boris pusher against the gyro-frequency and gyro-radius formulas, (5) RK4 bounce period against the published fit, (6) loss cone from the vector dipole against the closed form, (7) slant range geometry and (8) conservation of the magnetic moment.
2D companion: the sky is ray-cast on the CPU from the same emission model as the 3D scene; the foreground (lake, cabin, forest) is a Blender Cycles render with transparency.