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

Get cells on either side of an edge #47

Closed
EternalDeiwos opened this issue Aug 26, 2018 · 1 comment
Closed

Get cells on either side of an edge #47

EternalDeiwos opened this issue Aug 26, 2018 · 1 comment

Comments

@EternalDeiwos
Copy link

d3-voronoi has an edge object with edge.left and edge.right properties to get the index of the cell on either side.

Is there any chance you'd consider adding something similar to d3-delaunay? I've been trying to figure it out for the last while without success.

@mbostock
Copy link
Member

You can get the adjacent Voronoi cells using delaunay.neighbors. This is used to implement delaunay.find, for example. You can also access the internal data structures directly if you prefer, as described in this guide: https://redblobgames.github.io/delaunator/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants