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

Edges that both sides are clipped sometimes will not be identified as voronoi neighbor #137

Closed
UnluckyNinja opened this issue Mar 1, 2023 · 2 comments · Fixed by #138
Closed

Comments

@UnluckyNinja
Copy link

image
Reproduction: https://observablehq.com/d/3e65ad730f4712fc
Green lines visualize voronoi neighbors, red ones visualize delaunay-only neighbors.
If you change the first 3 parameters, cell 0-4, 1-5, 3-7, 2-6 are no longer neighbors occasionally.
It seems it only happens on both sides clipped edges. Edges that at least one end of it resides in viewbox are fine.

@Fil
Copy link
Member

Fil commented Mar 2, 2023

Yes. It happens on

*neighbors(i) {

I have also reproduced the issue here: https://observablehq.com/@d3/voronoi-neighbors-137

@UnluckyNinja
Copy link
Author

Tried the fixed version from #138 in my notebook. It's consistently and correctly recognized for the clipped edges now.
Very much appreciated.

@Fil Fil closed this as completed in #138 Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants