intersection of convex polygons
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?
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.
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.
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.
For a more general case, clip one polygon with the other polygon, and see what''s left.
on a similar note
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00009247&forum=3dtheory&id=-1
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=00009247&forum=3dtheory&id=-1
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement