Two Quadrilaterals Intersection Area (Special Case)
Okay, I have probably figured it out. The algorithm goes as follows:
- For each vertex of the first quadrilateral, check whether it is contained inside the second one - if so, store coordinates of the point.
- For each vertex of the second quadrilateral, check whether it is contained inside the first one - if so, store coordinates of the point.
- For each edge of one of the quadrilaterals (does not matter which one), check for intersections with edges of the other. Store coordinates of intersection points.
- Compute triangulation for all the points stored so far.
- Sum up areas of the triangles.