Craig Reynolds' classic boids algorithm: alignment, cohesion, separation. Tune weights live.
🌐 Try it live · 🌍 EN · 🌏 ZH
Craig Reynolds' classic boids algorithm: alignment, cohesion, separation. Tune weights live. Built as part of NovaSolver — 1600+ interactive physics & engineering simulators.
- Vanilla JavaScript — no build step, no framework lock-in
- Canvas / Chart.js rendering
- MathJax for equations
- Self-contained — drop
index.htmlanywhere and it runs
git clone https://github.com/novasolver/boids-flocking-simulation
cd boids-flocking-simulation
python -m http.server 8000
# open http://localhost:8000The index.html is self-contained and MIT-licensed. Take it, fork it, embed it.
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.