I need to find the medial axis of a concave polygon with holes. I'm using CGAL. My current approach is:
- Build the 2D segment delaunay graph of the polygon
- Extract the resulting output segments (bisectors)
- Test each segment to find if it's inside the polygon
- The resulting set of segments will form the medial axis of the polygon
I can build the SDG, and testing edges should be straight forward but I'm struggling to extract the edges of the SDG, or the corresponding Voronoi graph rather. There should be a few types of edges I'd expect: points, lines and parabolas.
How do I do this? Am I even on the right track?
Also I know I can iterate through the edges of the graph using one of the supplied methods and I understand this returns the face and opposite vertex to the edge. But how do I use this to get, say, the endpoints of a bisecting line?