Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What is the suggested method to find the intersection of two line *segments in 3D space programmatically?

I mean there are various methods to solve a set of 2 linear equations, eg. Using determinants, Matrices, the Add-Multiply-subtract-one-equation-from-another method (Sorry don't know what it's called).

Which one is best suited when using it on a machine/computer and why?

share|improve this question
    
You might find this helpful The Algorithm to Find the Point of Intersection of Two 3D Line Segment on SO. Regards –  Amzoti Jan 14 '13 at 21:05
    
In generally , for computer programming methods which could be algebraically formulated is the best. Because , other methods like adding and subtracting equations and thereby making the coefficient of all variables except one zero will need some kind of intelligence which a machine can't have. –  boywholived Mar 31 '13 at 12:33
    
The 'add-subtract-multiply' method of manipulating the rows (or columns, depending on your problem) of a matrix is known as Gaussian Elimination. –  A Blumenthal May 2 '13 at 3:13

1 Answer 1

The easiest to implement is projecting the lines onto 2D (most easily by dropping a common coordinate), finding their intersection point, and testing to see if the original lines share the point of intersection. The unprojected point can be recovered from the projection, since the slope of the line is known. Lines normal to the projection plane must be dealt with separately.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.