• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# intersection of convex polygons

## Recommended Posts

Hi, I need to get the points of intersection between 2 convex, coplanar polygons. The polygons may or may not intersect, and one can be completely inside another (in this case the inner polygon should be treated as the output). Can someone give hints to a simple solution to this problem?

##### Share on other sites
separating axis algorithm, once again. Tells you if two triangles (or convex polygons) intersect.

http://www.magic-software.com/Documentation/DynamicCollisionDetection.pdf

and page 26. "table for the potential separating axes for coplanar triangles". Easily extended to coplanar convex polygons.

once you know they intersect, the points inside the other convex polygons are the points of intersection.

##### Share on other sites
quote:
Original post by oliii once you know they intersect, the points inside the other convex polygons are the points of intersection.

Not true:

   +++++   ------------  +   +  ------------   +++++

No point of one polygon is inside another polygon.

##### Share on other sites
in general

For a more general case, clip one polygon with the other polygon, and see what''s left.

##### Share on other sites
on a similar note