Force-Directed Layout with Convex Hull
✓ Published0🌍 Public
BBaptisteL54
Last edited Feb 9, 2018
Created on Feb 9, 2018
This example shows 100 nodes grouped into nine clusters, each assigned a distinct color, with a Voronoi partition drawn over the simulated layout. The code uses d3.forceSimulation with forceX and forceY to position groups around a grid, plus d3.forceCollide to prevent overlaps, running 120 ticks before rendering. The Voronoi cells are computed with d3.voronoi and drawn as SVG paths, with a mouseenter effect that briefly highlights the corresponding cell in red. Nodes are rendered as circles using SVG, with links absent from the empty graph.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed