Canvas Voronoi
✓ Published0🌍 Public
Mmbostock
Last edited Jul 8, 2016
Created on Sep 23, 2013
One hundred randomly placed sites form a Voronoi diagram, rendered to a Canvas element. The cell containing the mouse position is filled red, while all cell boundaries and links between neighboring sites are stroked, and each site is drawn as a small circle. The first site follows the pointer via `d3.mouse` on touchmove or mousemove. The example uses `d3.voronoi` to compute cells, links, and polygons, with Canvas 2D context methods like `arc`, `moveTo`, and `lineTo` for drawing.
AI-generated descriptionAn interactive demonstration of d3-voronoi rendered to Canvas. Compare to SVG.
gpl-3.0 Licensed