Flocking Simulations

By Juan Carlos Ponce Campuzano, 15/December/2018



Introduction

Boids flocking behaviour is a classic model introduced by Craig Reynolds in 1986 to simulate the collective motion of birds, fish, or other groups of agents. Each boid (bird-oid object) follows three simple local rules:

  1. Separation (avoid crowding neighbours),
  2. Alignment (steer towards the average heading of nearby boids), and
  3. Cohesion (move towards the average position of neighbours).
Despite the simplicity of these rules, the system produces lifelike emergent behaviour, where complex flocking patterns arise naturally without a central leader.

Here you can find a set of flocking simulations inspired by Daniel Shiffman's Coding Challenge #124


Interactive simulations

Click on the image of title below to access the simulation.

Rainbow 3d flowers

3D model made with GeoGebra.


If you found this site useful, you can support it with ❤️ PayPal or Patreon. I sincerely appreciate it. Thank you! 😃


References

  1. Craig Reynolds - Boids: Background and Update.
  2. Craig Reynolds - Original 1986 Boids simulation.
  3. Daniel Shiffman - Vectors - The Nature of Code.
  4. Daniel Shiffman - Combining Steering Behaviors: Flocking - The Nature of Code.
  5. Gary William Flake - The Computational Beauty of Nature.