Skip to content

novasolver/boids-flocking-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Boids Flocking Algorithm

Live demo License: MIT

Craig Reynolds' classic boids algorithm: alignment, cohesion, separation. Tune weights live.

🌐 Try it live · 🌍 EN · 🌏 ZH


Why

Craig Reynolds' classic boids algorithm: alignment, cohesion, separation. Tune weights live. Built as part of NovaSolver — 1600+ interactive physics & engineering simulators.

Tech

  • Vanilla JavaScript — no build step, no framework lock-in
  • Canvas / Chart.js rendering
  • MathJax for equations
  • Self-contained — drop index.html anywhere and it runs

Run locally

git clone https://github.com/novasolver/boids-flocking-simulation
cd boids-flocking-simulation
python -m http.server 8000
# open http://localhost:8000

Use it in your project

The index.html is self-contained and MIT-licensed. Take it, fork it, embed it.

Part of NovaSolver

This repo is a "flagship" version of one simulator from the physics-simulators monorepo. The monorepo has 1600+ more tools across:

  • Structural mechanics (beam, buckling, fatigue, FEM)
  • Fluid dynamics (Reynolds, Bernoulli, potential flow, CFD basics)
  • Heat transfer (1D/2D conduction, fins, radiation)
  • Electromagnetics (RC/RL, Bode, antennas, FDTD)
  • Multi-physics & math fun (Lorenz, boids, Lissajous, n-body)

novasolver.jp/tools/ for the full catalog.

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors

Languages