Bird Murmuration
An implementation of the Boid algorithm to simulate animal flocking behavior in 2D and 3D.
The Boid algorithm simulates bird murmuration or other insect-like swarm behavior by giving inividual Boid-class objects a sense of cohesion (a tendency to want to group together), alignment (Boids want to fly in the same direction as the average center of mass velocity), and finally a sense of dispersion (individual Boids take up physical space and do not want to clump together into a single point). The simulation below shows two separate runs of a Boid implementation in both 2 and 3 dimensions. The code repository is linked here for your inspection.