intersection of two closed plane polygonal curves

33 Views Asked by At

I am developing a program where I need to find the intersection of two closed plane curves.

The curves are exclusively composed of edges (such as triangles, rectangle, right trapezoid, but not circle or ellipse), and they are usually just some simple polygons.

I have the coordinates of the vertices of each curve. For instance, $(0,0,0)$, $(1,0,0)$, $(1,1,0)$, $(0,1,0)$ would be a square.

Is there a systematic approach to determine the exact line segments where these two curves intersect? Note that I am looking for the line segments in these two curves, not lines, since line intersections are quite easy to find.