In Particle Life, each particle reacts to nearby colors. The force matrix sets which colors attract or repel; a short-range repulsion also pushes them apart. Different settings produce clusters, chains, or scattered particles.

Steering the particles
The "ghost" is an extra force I added to the simulation. Its direction depends on position in the frame. It nudges passing particles along paths that form spirals and rings.
Turn the field off to see the color-based interactions alone. Choose a pattern from the menu to hold it, or check Cycle automatically to let the shapes blend into one another. Density layers applies a second pattern to tightly packed particles.
Drag a finger or mouse through the swarm to push particles aside. A quick swipe sends them flying. Hold Shift while dragging with a mouse to stir them instead.
Unlock raises the desktop limit from 40,000 to 100,000. On phones, it raises the limit from 8,000 to 40,000.
This builds on Ventrella's Clusters, Tom Mohr's Particle Life, and lisyarus's WebGPU implementation. The simulation and added flow field are in particle-life.js.