Jump to content
  • Advertisement
Sign in to follow this  
jimgeagea

3D coplanar Line Segment - Linesegment intersection

This topic is 3975 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, i am trying to find the fastest way to find the intersection points between 2 coplanar line segments, if the line segments intersect at one point, i want to know that point, and if they line segments were collinear, then the intersection is another linesegment or a point.. how can i do those tests the fastest way?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by jimgeagea
Hi,
i am trying to find the fastest way to find the intersection points between 2 coplanar line segments,

if the line segments intersect at one point, i want to know that point,
and if they line segments were collinear, then the intersection is another linesegment or a point..

how can i do those tests the fastest way?
In your other thread I asked what it was you were doing exactly. You said it wasn't a secret, but you still didn't answer :)

The reason I ask (aside from curiosity) is that if we knew why you needed to compute intersection points between coplanar polygons in 3D, we might be able to suggest a better overall approach then multiple segment-segment intersection tests.

So, what are you doing exactly? :-D

Anyway, I can think of a couple of options:

1. Project all of the polygons to a plane and perform the intersection tests in 2D. 2D segment-segment tests are pretty well documented online - you'll just have to Google around a little.

2. Find the closest features between the two segments; if they're sufficiently close to each other, you have an intersection (linear components in 3D will rarely intersect exactly due to precision issues, so it's best to use a tolerance). You can find info on computing the closest features between two segments online as well (although it's a little less well documented than the 2D case). For this, you might start at geometrictools.com.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!