Jump to content
  • Advertisement
Sign in to follow this  
ghez_ghuzak

3D Polygon intersection

This topic is 3632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!