My question is about the creation of visibility graphs in surfaces with multiple convex and concave polygons. My problem is that i am not able to classify whether the line segments connecting the nodes of the same polygon go through or don't go through this polygon. As seen in the picture below:
I'd need to separate the orange, invalid lines from the blue, valid lines. I hope somebody can provide me a solution to this problem with a suitable algorithm that can be implemented in python.
Or for even complexer polygons?: difficult polygon
I have written the code hope it works as required,but there maybe errors:o,the logic is correct,there may be syntax or other errors you have to take care of(I can help in that case) I have excluded one case if the two points chosen are consecutive,then it is obviously the side of the polygon(trivial to check).