1Three rules, one neighbourhood
A boid's neighbours are the flockmates within radius r. Separation pushes away from the ones that are too close, weighted by 1 / distance so the nearest push hardest. Alignment turns towards their average heading. Cohesion steers towards their centre. Three sliders weight them against each other.
The ringed boid has … neighbours within r = …, and … of them inside the separation ring.
s = Σ|d|<rs (xᵢ − xⱼ) / |xᵢ − xⱼ|²separation: away from crowding, rs = 0.45 rs = …
a = (1/k) Σ vⱼalignment: the neighbours' mean velocitya = …
c = (1/k) Σ xⱼ − xᵢcohesion: towards the neighbours' centrec = …