Flocking simulation using steering behaviors created by Craig Reynolds.

Steering behaviors:

  • Cohesion: Attempt to go toward the center of mass.
  • Alignment: Try to face the same direction as nearby boids.
  • Separation: Avoid other boids if too near.

You might want to see a similar simulation using quadtree data structure to divide the space.

Options