Archived

This topic is now archived and is closed to further replies.

Line-Line Intersection in 3D

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

Recommended Posts

Hi, does anyone know how I can test if a Line intersects with an other Line in 3D??? (Each line has only 2 Points.) Au''revoir, Aya~

Share on other sites
Bad idea to do line-line intersection, as it''s subject to floating point error. Your options:

1. cylinder-line intersection, which''ll tell you whether the lines are "close enough" to each other.

2. line-line distance, which''ll tell you how close they are.

3. Plucker coordinates, which''ll tell you which "side" of one line the other line is on. If it''s different than before, the lines intersected at some point.

Which you choose depends heavily on what you''re actually trying to do. So: What are you actually trying to do?

How appropriate. You fight like a cow.

Share on other sites
Hi,

ok... line-line distance is the best I think..

Did you know how to calculate this??

Au''revoir,
Aya~

Share on other sites
quote:
Original post by AyaKoshigaya
Hi,

ok... line-line distance is the best I think..

Did you know how to calculate this??

Au''revoir,
Aya~

Yeah..... but I posted it recently, so you should be able to search for it. The basic idea is to find the projection of the intersection onto the plane that both lines are parallel to, then back-track that projection to the points on each line, then compute the distance between them.

How appropriate. You fight like a cow.

Share on other sites
if one line contains A and B, while the other C and D:
(pseudocode)
dist=normalize(AB x CD) . AC
You can use any points instead of A and C which are on each line respectively.

Share on other sites
The only problem is if he meant line segments, in which case you can''t do just a line-line distance check. Any two coplanar line segments will give you a zero distance, but they might not always intersect.

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 103
• 11
• Forum Statistics

• Total Topics
632976
• Total Posts
3009672
• Who's Online (See full list)

There are no registered users currently online

×