intersection of convex polygons

Started by
4 comments, last by lun123 20 years, 6 months ago
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?
Advertisement
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.

Everything is better with Metal.

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.
in general

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

Everything is better with Metal.

on a similar note

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00009247&forum=3dtheory&id=-1

Everything is better with Metal.

Also, see my thread from a few days ago.

This topic is closed to new replies.

Advertisement