I have multiple 2D polygons (with solid color) coordinates as a numpy array which are lying on top of each other. I want to calculate the visible are of each polygon.
Example:
polygon1 = np.array([[0, 461],[1919, 512],[1919, 0],[0, 0]])
polygon2 = np.array([[0, 420],[ 437, 380],[1057, 350],[1572, 347],[1919, 405],[1919, 639],[0, 639]])
Some part of polygon2 lies on first polygon. How to calculate the total visible area of polygon1 or area of intersection ?