How do the same flocking rules behave with an extra dimension?
Flocks gather and wheel through the volume rather than along a flat plane.
Try thisRaise vision from 6 to 10 to let each flocker align with a larger group.
About this model
Where it ends up
Directional birds gather into groups that travel and turn together.
The same local rules as Flocking, extended to three axes. Each flocker has a position and velocity in a volume, with no leader or global plan.
A flocker turns away from its closest neighbour when they are too close. Otherwise it aligns with nearby velocities and steers toward their centre. Every flocker reads the same frozen tick before they all move together.
Drag to orbit the bounded world and scroll or pinch to zoom. The torus wraps all three axes; the visible border marks its seams.
Each bird points along its velocity in three dimensions, so turns remain visible as you orbit.
IdeaCraig Reynolds
MathPetsMathPets · org
Three-dimensional extension of the MathPets Flocking example, using Reynolds' Boids steering rules.