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 Delaunay triangulation for n = 0, n = 1 and n = 2. #19
Comments
Hello Mike, The n=0 and n=1 cases are easy to work around (it's just the entire bounding area). But the n=2 requires cooperation from the underlying voronoi region algorithm. I'm not super familiar with the mathematics behind delaunay triangulation or voronoi regions or else I'd write up a pull request. If you could find some time to fix this issue, it would be much appreciated. |
Here's my tentative It's gross (try/catch, and add external points at near-infinity if the triangulation failed). But hey! |
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
Fixed by 2ee9847 |
Currently we throw an error from Delaunator:
There is a valid Voronoi diagram for n = 1 and n = 2, so we should allow an empty Delaunay triangulation with no triangles in these cases. And similarly for n = 0, we can have an empty Voronoi diagram with no cells.
The text was updated successfully, but these errors were encountered: