Turning waves, raptor pressure and the energy cost of flying in a flock, from the last light until the birds drop into the reeds.
Two identical 600-bird flocks fly side by side (same random numbers). In one, the 80 front birds are forced to turn 70 degrees for 0.4 s. The curve shows what fraction of the flock ends up pointing more than 10 degrees differently from its control twin. It runs on your device and takes a few seconds.
The science
Topological interaction. Each bird reacts to its k nearest neighbours (k = 6-7 in the field data of the STARFLAG project), not to everything within a fixed radius. Desired direction: d = wa â + wc ĉ + ws ŝ + wr r̂ + wf f̂ + noise (alignment, cohesion, separation, roost pull, flight from the raptor); the heading then turns toward d with a reaction time τ: Δθ = θ (1 − e−Δt/τ), capped at ωmax Δt.
Flight power (Pennycuick, fixed-wing form). Pmech(v) = A/v + B v³ with A = 2 k (m g)² / (π ρ b²) (induced) and B = ½ ρ (S CD)eq (body drag + wing profile, lumped). Minimum power at vmp = (A/3B)1/4, best range (minimum energy per metre) at vmr = (A/B)1/4. Chemical power is Pmech/η with η = 0.23; fat holds 37 kJ/g. Constants: m = 75 g, b = 0.38 m, k = 1.2, (S CD) = 2.4×10−4 m² (model values, not a measured bird).
Banked turns cost power. In a coordinated turn tan φ = v ω / g and the wing carries n = 1/cos φ times the weight, so the induced term grows by n²: P = n² A/v + B v³. A flock that turns sharply therefore burns more fat. The tracked power per bird above is averaged over birds that are airborne.
Turning waves. In real flocks a turn spreads through the flock faster than the birds fly (20-40 m/s, Attanasi et al. 2014), explained by inertial "spin" dynamics. This model has only a first-order reaction lag, so it shows the delayed, spreading response and its dependence on τ, but it does not reproduce those measured wave speeds. Simplifications: point birds, no aerodynamics between birds, no wind, constant air density 1.2 kg/m³, birds drawn 5x oversize, a few hundred to a couple of thousand birds instead of 104-105, the raptor is a pursuit-curve agent. Assets built with Blender; scene by Three.js.