3D Polygon intersection

Started by
1 comment, last by Daaark 15 years, 9 months ago
HI, im looking for an algortihm that is able to finde the intersection of 2 polygons ind 3D.the polygons are convex and usually habe 3 , 4 or 5 edges. ex: input p1=[(x1,y1),(x2,y2),(x3,y3)] , p2=[(m1,n1),(m2,n2),(m3,n3)] output = intersection of p1 and p2 thanks for your help
Advertisement
If two convex polygons intersect, at least one edge of one polygone penetrates the other polygon.

Take the vertices of the first polygon and check them against the plane of the second. If they are all on the same side of the plane the polygons can't intersect, but if at least one vertex is on the other side of the plane, you compute the intersection point of the edges consisting of vertices on different sides of the plane and the plane itself. If this intersection point lies inside the second polygon, your polygons intersect.

But this istn't enough, you'll also have to check the vertices of the second polygon and against the plane of the first.


You could also compute the line where the planes of the two polygons intersect and check if it lies inside both polygons.

[Edited by - DraganO on July 14, 2008 9:42:38 AM]
Quote:Original post by ghez_ghuzak
HI,

im looking for an algortihm that is able to finde the intersection of 2 polygons ind 3D.the polygons are convex and usually habe 3 , 4 or 5 edges.

ex: input p1=[(x1,y1),(x2,y2),(x3,y3)] , p2=[(m1,n1),(m2,n2),(m3,n3)]
output = intersection of p1 and p2

thanks for your help


You might find this helpful?

This topic is closed to new replies.

Advertisement