Hacker News new | ask | show | jobs
by madethemcry 1834 days ago
This reminds me of the flocking boids algorithm by Craig Reynolds [0] which is based on three principles:

  + separation: steer to avoid crowding local flockmates
  + alignment: steer towards the average heading of local flockmates
  + cohesion: steer to move towards the average position (center of mass) of local flockmates
The algorithm was used to animate the bat swarms in Batman Returns (1992) [1].

I love this algorithm, it's easy to develop and experiment with and the results feel beautiful & natural.

  [0]: https://www.red3d.com/cwr/boids/
  [1]: https://en.wikipedia.org/wiki/Boids