Quote:
Originally Posted by jacksoncapper I have been trying so long to do this simple thing. I have two 3D line segments, each represented by two points. I need to know if and where these two lines intersect, but I need a method that I can implement programmatically in an algorithm. Please any help would be greatly appreciated. | Let the points be  and  and  and  . Then the line segments are:
The lines intersect if there are ![\lambda,\ \mu \in [0,1] \lambda,\ \mu \in [0,1]](http://www.mathhelpforum.com/math-help/latex2/img/d11d417cf543e98edd3f62defbf124b2-1.gif) such that:
Now write these out in terms of the components and you have three
simultaneous linear equations for  and  . If there is a solution
with  and ![\mu \in [0,1] \mu \in [0,1]](http://www.mathhelpforum.com/math-help/latex2/img/40c22bb74ef18fef1869b28e9a8a702b-1.gif) then the line segments intersect.
RonL
__________________ Truth does not change because it is, or is not, believed by a majority of the people.
Giordano Bruno
Last edited by CaptainBlack; January 19th, 2008 at 08:18 AM.
|