Skip to main content
100%

Voronoi Clipping

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Dec 8, 2012

Two points generate a two-cell Voronoi diagram clipped to the SVG canvas. The example shows how `d3.geom.voronoi` clips its output polygons using the `.clipExtent` method, with each cell rendered as an SVG path and each input point as a circle. D3.v3’s `category10` scale colors the cells and points. Hovering a path slightly raises its fill opacity, though no other interaction is implemented.

AI-generated description

The Voronoi layout, d3.geom.voronoi, provides clipping via the clipExtent property. If no clip extent is specified, the returned shapes cover the area [±1e6, ±1e6].

gpl-3.0 Licensed

Similar vizzes