-
Notifications
You must be signed in to change notification settings - Fork 0
Voronoi Geom
mbostock edited this page Apr 25, 2012
·
2 revisions
Wiki ▸ API Reference ▸ Geometry ▸ Voronoi 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. 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.