Rano AH

Rano AH

  • NA
  • 176
  • 111.9k

Find the intersection point for two lines

Mar 3 2014 11:59 PM
Hello all,

I need a function that checks whether two lines intersect. The function will accept four points which are the start and the end point for each line. Also, if they intersect, then it will return the intersection point.
Consider each point has (x,y,z) values.
 
Suppose that I have two lines A and B

Line A, Start point = (x1,y1,z1) and the end point = (x2,y2,z2)

Line B, Start point = (x3,y3,z3) and the end point = (x4,y4,z4)

How can I find the intersection point (x,y,z)? I tried to do some search but didn’t understand. not sure which equation I need to use here. Can you help me on this?


Answers (2)