boostorg / polygon

Boost.org polygon module
http://boost.org/libs/polygon
55 stars 70 forks source link

[voronoi] The diagram has an infinite segment that origin point inside in closed polygon. #72

Open SiTiGi opened 2 years ago

SiTiGi commented 2 years ago

Boost version 1.75.0. Created a voronoi diagram for a given closed polygon. The diagram has an infinite segment(ray) that origin point inside in polygon. As far as I understand, such cases should not be for closed polygons and second point of this segment must on the perimeter. Also in this case, two segments of the diagram intersect. Source polygon: Perimeter.txt Diagram (Blue segments are polygon. Black segments are primary. Green segments are secondary.): image Infinity segment (Blue segments are polygon. Infinite segment(ray) is red. Black segments are primary segments inside polygon and not touching perimeter.): image Segments intersect (Blue segments are polygon. Black segments are primary. Green segments are secondary.): image

bubnikv commented 2 years ago

Will it fix if you rotate the polygon slightly? I have a feeling that there are some issues with strictly vertical lines.