Let's say I have a polygon defined by a set of coordinates. I also have the radius and (x, y) coordinates of the centre of $n$ circles. I am looking for a function to find the total area of the circles within the polygon, i.e if there are circle segments outside of the polygon, they are not counted towards the area.
My initial thought was to simply find the area of union of the circles, but I am stuck in subtracting the areas of the segments outside of the main polygon. I know I can find the area using the shoelace method, but I am unable to see how this will assist me in getting a result.
Here's an image to demonstrate - I want to find the area of the green space, using only the labelled points and distances as input: