This is the top-down 2D companion to the 3D InstancedMesh drone show: every formation generator below is the same coordinate math as the 3D version (the fibonacci-disc, grid, torus-band and wave generators literally reuse the 3D formulas' x/z components), it's just drawn from directly overhead instead of orbited with a camera. The one exception is the helix — top-down that degenerates into a plain circle, so it's replaced here with a genuinely 2D formation, an Archimedean spiral:
circle: r = R·√(i/n), θ = i·goldenAngle (Vogel/fibonacci disc)
spiral: θ = t·2π·turns, r = R_max·t (Archimedean, r ∝ θ)
torus: x = (R + r·cosU)·cosV, y = (R + r·cosU)·sinV (top view of a torus)
wave: x,y = grid, altitude = sin(dist·k)·A
Where the 3D version used the third coordinate for height, this view encodes it as brightness and glow radius instead — brighter, larger dot = drone flying higher, exactly how a ground observer reads a real drone-show swarm at night. Formations morph on an eased hold→blend→hold cycle (cubic ease-in-out over each transition), matching the 3D original's timing.
- Trail persistence — how much of the previous frame is kept before the next is drawn (canvas alpha-fade), producing motion streaks proportional to drone speed.
- Avg. drone speed — mean per-frame positional delta across the swarm, in on-screen px/s; it should spike during a morph and settle near zero once the formation holds.