Robot / cell colour Target centroid
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Swarm Coverage Control — Voronoi Partitioning & Lloyd's Algorithm

This simulation shows how a robot swarm spreads itself across a region with no central coordinator: each robot claims the patch of space nearest to it (a Voronoi cell), computes that cell's density-weighted centroid, and drifts toward it. Repeating this locally at every robot is exactly Lloyd's algorithm, and it provably drives the whole swarm downhill on a real coverage-quality cost until the deployment locally stabilises into a centroidal Voronoi tessellation. Switch the importance field between a flat priority and one or two "hot zones" to watch the swarm automatically reallocate — more robots, smaller cells, near the regions that matter — the same distributed algorithm used to deploy real surveillance-drone fleets, ocean-sensor buoys and warehouse-monitoring robot teams.