Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

boids-boids-boids

Little boids simulation in JavaScript attempting to replicate shoals of bait fish. It uses the classic heuristics:

  • Separation (no boid should be too close to any other).
  • Alignment (boids try to fly in the same direction as nearby ones are).
  • Cohesion (boids try to stay with one another).

Future Work

I hacked this together fairly quickly; I'd call this 'Matt Parker style' code (although, to be fair, I'm not importing libraries in a loop body). Some obvious improvements that could be made:

  • Boids currently have 360-degree vision, which is nonstandard.
  • Use quadtrees to do KNN (rather than the uniform-partitioning scheme that I tossed together).
  • Use some linear-algebra library to handle vectors and associated maths (rather than hand-coded component-wise implementations).

Resources

About

Hacky Boids Simulation

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages