Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define Voronoi diagram for entirely-collinear input? #20

Closed
mbostock opened this issue Mar 21, 2018 · 1 comment
Closed

Define Voronoi diagram for entirely-collinear input? #20

mbostock opened this issue Mar 21, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

This throws an error (No Delaunay triangulation exists for this input):

Delaunay.from([[0, 0], [1, 1], [2, 2]])

But like #19, there is a valid Voronoi diagram for this input! The problem is that all the cells have infinite sides and no points. Hrm.

@mourner mourner added the enhancement New feature or request label Mar 23, 2018
Fil added a commit that referenced this issue Jun 19, 2019
Fix Delaunay and Voronoi for degenerate cases

For 0, 1, 2 points, and for collinear points:
- returns the correct topology (neighbors, find)
- returns the correct Voronoi cells (bounding box, half plane…)
- resorts to deterministic jittering only in the case of multiple collinear points

Fixes:
-  #19
-  #20
-  #50
-  #65
@Fil
Copy link
Member

Fil commented Jun 20, 2019

Fixed by 2ee9847

@Fil Fil closed this as completed Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants