What's the bounding box for computing Voronoi Diagram in boost library
Asked Answered
T

1

9

Recently I am trying to use the library boost to compute Voronoi diagram. The algorithm in this library is based on sweep-line. But it is not based on a bounding box to generate diagram. Some of Voronoi edges from this library are infinite and should be clipped. Now I am confusing about these infinite edges. because they should depend on a bounding box, see the following picture as an example:

If the bounding box is the inner white rectangle, then the four segments with black cross are infinite. Otherwise, if the bounding box is the outer black rectangle, then these four lines are finite and there are some other edges appear.

Could someone tell me what's it in this library? I can't find answer to this problem. and I really need a bounding box to define these cells.

enter image description here

Tarnetgaronne answered 12/2, 2013 at 10:19 Comment(2)
"If the bounding box is the inner white rectangle, then the four segments with black cross are infinite." Could you please upload a picture showing that?Jempty
you can see from the picture, if the boundingbox is the white rectangle, the crossed edge will be not segment and will be given by a point and a NULL in the boost library. However, if black boundingbox is used, these the crossed edges are segments and will be given by two points.Tarnetgaronne
M
1

I am the author of the Voronoi library. The implementation generates Voronoi diagram for the whole infinite 2D plane. The clipping functionality is not part of the library as it's too ambiguous. Could you explain your usage case in more details?

The better way to clarify any questions related to the Voronoi functionality is to write to [email protected] with an email title prefixed with "[Polygon]" or "[Voronoi]".

Michigan answered 30/4, 2013 at 22:24 Comment(1)
Dear Andrii, welcome to Stack Overflow! It is great to have people like you here as it greatly enriches the community. However, when posting an answer please include a short explanation, not only contacts/links - it is a Q&A site and other people who have similar problems would read it and it would be much more helpful. This is more of a comment than an answer as it stands. If the person asking this question gets back to you please post your answer here as well. Thanks :)Rotation

© 2022 - 2024 — McMap. All rights reserved.