Skip to content

Learning Javascript by visualizing flocking behavior.

Notifications You must be signed in to change notification settings

davemilller/boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Boids

Boids are objects that exhibit flocking behavior based on 3 rules.

  • Separation: Avoid collision with others
  • Alignment: Align with the average velocity (speed and direction) of the flock
  • Cohesion: Move towards the center of mass of the flock

Running the visualization

Clone this repository and open index.html locally to see the boids and mess with the code.

TODO

  • Add sliders to adjust separation, alignment, and cohesion factors.
  • Add sliders to adjust number of boids, visual range, speed limit.
  • Make different shaped boids.
  • Have the boids land on the bottom of the screen and take off again.
  • Allow collisions (maybe one absorbs the other).
  • Be able to draw a path for the boids to follow (attraction).
  • Be able to draw walls.

About

Learning Javascript by visualizing flocking behavior.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published