Search code examples
c#algorithmgeometrypolygonarea

Find overlapped area between a circle and a group of polygons


I found some solutions to find the intersection between the circle and 1 triangle.

I am searching for a solution to find a more general solution, to find the area of the circle overlapped by the polygons present in the plan.

No 2 polygons intersect each other nor self-intersect.

A circle can be intersected (overlapped) by multiple polygons.

I would appreciate a C# solution.


Solution

    1. Triangulate your polygons.
    2. For each triangle i, compute the intersection area of your circle and triangle i. Call it A[i].
      (You said you know how to do this part.)
    3. The area of the intersection between your circle and your polygons is sum(A[i] for all triangles i).