Capacity Constrained Point Distributions
Animated Voronoi diagrams partition a canvas into colored cells, each containing a cluster of small points. The algorithm iteratively balances point distributions by swapping points between neighboring cells until a capacity constraint is met. This implementation uses `d3.voronoi` for cell computation, `d3.scan` for efficient candidate selection, and `d3.transition` to fade cell fills once stabilized. The process shows how points redistribute across regions over time.
AI-generated descriptionCapacity Constrained Point Distributions, an algorithm by Michael Balzer, Thomas Schlömer & Oliver Deussen (University of Konstanz, Germany, 2009).
(Not sure I have implemented it correctly, but it seems to work, albeit slowly.)
Idea found on n-e-r-v-o-u-s.
I made variant with a Delaunay topology to get much faster results. It seems to work quite well in practice.
And here is also a data-based variant.