whatLocusts in a ring. Thinly crowded they mill in chaos; add a few more and the whole ring snaps into one marching band going one way round. The sparkline is the order parameter, zero for chaos and one for a march.
whyThis is a phase transition in living animals, measured in Buhl's ring experiment: past a critical density, a swarm marches. The piece lets you push the density over that line and watch the switch flip.
howEach locust turns toward the mean heading of its neighbours, and how hard it turns, and how fast it walks, grows with how many neighbours it has: nothing below a few, everything past a crowd. Alone it wanders. The arena is a ring, so a march has only two ways to go. Click to add a patch of locusts.