Expand and fill force (work in progress)
✓ Published0🌍 Public
PPhilippe Rivière
Last edited Oct 31, 2018
Created on Dec 18, 2016
Five hundred colored circles cluster in a cloud, then slowly diffuse outward as a force simulation seeks lower-density regions. The visualization uses custom forces within d3.forceSimulation, including a grid force and a hexbin-based expand force that samples random hexagon rotations and pushes nodes toward emptier neighboring bins. Rendered on Canvas, the circles respond to mouse movement, with the first node pinned to the cursor and the simulation restarting on interaction. The code employs d3.hexbin to compute density weights and d3.forceCollide to prevent overlaps.
AI-generated descriptionA force that tries to expand to lower density regions.
gpl-3.0 Licensed