Skip to content

Valentin-Lemaire/boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Boids Simulation

A real-time simulation of boids (bird-oid objects) using HTML5 Canvas and JavaScript. This project demonstrates emergent behavior through the implementation of three simple rules:

  1. Separation: avoid crowding neighbors
  2. Alignment: steer towards average heading of neighbors
  3. Cohesion: steer towards average position of neighbors

Features

  • Full viewport canvas
  • Responsive design
  • Smooth animation
  • 100 boids with realistic flocking behavior
  • Dark theme for better visibility

How to Run

Simply open the index.html file in a web browser to see the simulation in action.

Technical Details

The simulation is built using vanilla JavaScript and HTML5 Canvas. The boids are represented as simple circles that follow the flocking rules. The simulation runs at the browser's refresh rate using requestAnimationFrame.

Controls

The simulation runs automatically and will adjust to window resizing. No user input is required to view the flocking behavior.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published