Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 897
Jun Avatar asked Feb 12 '13 10:02

Jun


1 Answers

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]".

like image 89
Andrii Sydorchuk Avatar answered Sep 19 '22 15:09

Andrii Sydorchuk