Jellyfish (color = phase) Perception radius (selected)

Jellyfish Swarm: Flocking & Jet Propulsion (2D)

This 2D companion replaces the 3D version's independently-drifting jellyfish with an actual flocking algorithm: separation, alignment and cohesion forces (Reynolds boids) steer each jellyfish relative to its neighbors, layered with a jet-propulsion pulse cycle that genuinely pushes each one forward during bell contraction. Sliders control population, perception radius, the three flocking weights and pulse rate; live readouts track the swarm's alignment order and mean neighbor spacing.