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

Restrict Voronoi edges to [1,2]^2 #17

Open
robertdj opened this issue Apr 20, 2016 · 4 comments
Open

Restrict Voronoi edges to [1,2]^2 #17

robertdj opened this issue Apr 20, 2016 · 4 comments

Comments

@robertdj
Copy link
Contributor

The Voronoi edges near the edges of the square [1,2]^2 often have an endpoint way outside of the square. Is it possible -- in the voronoiedges function -- to restrict the line segments such that both endpoints are always inside or on the border of the square?

@skariel
Copy link
Contributor

skariel commented Apr 24, 2016

the current behaviour is correct, the only thing restricted inside the allowed region is the generator points, so yes, the Voroni cells can go outside, I don't see a problem here

Edit: typo

@robertdj
Copy link
Contributor Author

It's definitely correct if you want the unrestricted Voronoi tesselation. But sometimes I want the intersection of the tessellation with allowed region. It's of course possible to compute intersections between the line segments and the square, but it would be nice to avoid it.

@skariel
Copy link
Contributor

skariel commented Apr 25, 2016

you have a point, I'm tagging this as "enhancement"

@valiaaeft
Copy link

@robertdj Can you provide a concrete example on what you want ? I may be interested to implement it

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

No branches or pull requests

3 participants