I have two polygons that have some intersection. Then there are some areas which belong to either Polygon1 or Polygon2.
How can I find the coordinates of those areas? Is there any algorithm to do that?
Please suggest !!
The image shows that the points belonging to shaded area is what I want to have here.
This is a standard, though quite non-trivial, computational geometry problem.
It is not too difficult to write your own algorithm to organize a loose list of points and edges into a polyhedral complex, by detecting line segment intersections, sorting edges around each vertex, walking around the faces, etc etc. But the path of least effort will surely involve leveraging as many existing libraries as possible. For example, here's how I would do it: