Voronoi Geom - zziuni/d3 GitHub Wiki

WikiAPI ReferenceGeometryVoronoi Geom

This implementation does not clip the returned polygons, so if you want to clip them to a particular shape you will need to do that either in SVG or by post-processing with polygon.clip, as in this example. If any vertices are coincident or have NaN positions, the behavior of this method is undefined: most likely, invalid polygons will be returned! You should filter invalid vertices, and consolidate coincident vertices, before computing the tessellation.

# d3.geom.voronoi([vertices])

Returns an array of polygons, one for each input vertex.

# d3.geom.delaunay([vertices])

Returns an array of triangles.

⚠️ **GitHub.com Fallback** ⚠️