lycantropos / voronoi

Python port of boost/polygon Voronoi library (with separate C++ binding)
https://github.com/boostorg/polygon
MIT License
7 stars 2 forks source link

What's the algorithm used to construct the voronoi diagram with segments as sites instead of points? #3

Open eddsanity opened 1 month ago

eddsanity commented 1 month ago

Hey, I noticed that this code can generate VDs with sites being line segments and I was curious to know what algorithm it uses to do that.

I know Fortune's algorithm is used with points as sites but I don't know if it would work for segments. Thanks

lycantropos commented 1 month ago

From boost/polygon docs

The Voronoi extensions were developed as part of the Google Summer of Code 2010. The library was actively maintained for the last three years and involved deep mathematical research in the field of algorithms, data structures, relative error arithmetic and numerical robustness. Upon the community request, more details on the theoretical aspects of the implementation will be published. The authors would like to acknowledge the Steven Fortune's article "A Sweepline algorithm for Voronoi diagrams", that covers fundamental ideas of the current implementation.

So it looks like an algorithm is based on Fortune's paper https://dl.acm.org/doi/pdf/10.1145/10515.10549

eddsanity commented 1 month ago

I am aware of the original Fortune's Algorithm, but it works on points as sites while this works on line segments as sites so it's a pretty substantial extension to the original algorithm and I was wondering about that extension if it is formalized or explained anywhere