Jump to content
  • Advertisement
Sign in to follow this  
Geeman

Line-Line Intersection 3D

This topic is 4844 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, How can I determine the point of intersection of two lines in 3D space? I have been using http://www.gamedev.net/reference/articles/article423.asp for 2D space, and it works wonders. But I need to extend it into 3D Space. Thanks

Share this post


Link to post
Share on other sites
Advertisement
In 3D, you'll be more interested in whether two lines are "close enough" than whether they're intersecting; numerical imprecision will make your intersection calculations all wacky otherwise. And to determine how close they are, look here.

Share this post


Link to post
Share on other sites
Thanks,

Ok, say I calculated how close my lines are. I use a tolerance value to determine if the lines are touching or not.

I still need to know where (or at least, close to where) the 'intersection' is

Share this post


Link to post
Share on other sites
Quote:
I still need to know where (or at least, close to where) the 'intersection' is
If you use the minimization algorithm (as described in Eberly's materials, or Graham's article in GPG), you should end up with parametric values corresponding to the closest pair of points on the lines. The average of these two points will give you an approximate point of intersection. (Let me know if that's not clear...)

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!