d3 / d3-voronoi

Compute the Voronoi diagram of a set of two-dimensional points.
Other
249 stars 60 forks source link

voronoi.polygons will run out of memory or return incorrect polygons for certain data sets. #33

Closed Tsukinara closed 5 years ago

Tsukinara commented 5 years ago

Extending on top of #28 and #16, voronoi.polygons will either crash, return incorrect data, or run out of memory on certain sets of linear data.

JSFiddle demonstrating the second case (incorrect polygons) here: https://jsfiddle.net/y3t9026e/ I've also generated a couple of other bad datasets for all 3 different cases here: https://pastebin.com/hHxWEvb1

Unfortunately, Delaunay also fails for linear data sets (since triangles cannot be generated within points in a line), so that is not an option for the time being.

mbostock commented 5 years ago

Sounds like this is covered by #28.