1. Calculate slope for line 1 set s1 = (y2-y1)/(x2-x1) 2. Calculate intercept for line 1 set i1 = (y2-y1)/(x2-x1)*x2 - y2 . Calculate slope for line 2 similarly 4. Calculate intercept for line 2 similarly 5. Set equation for line 1 = equation for line 2 and solve for x set x = i1 + s1*x2 - i2 - s2*x2 6. plug x in either equation to get value for y
(I have done this quickly so I may have made a few errors) >>> [EMAIL PROTECTED] 03/17/02 08:23PM >>> Hi list! I have a mathematical problem that I am not able to solve on my own: Suppose you have two straight lines, defined by two points: Let's say point(x1, y1) and point(x2, y2) for line 1 and point(x3, y3) and point(x4, y4) for line 2. What's the algorithm for calculating the point where these two lines intersect? Thanks for your help! Michael von Aichberger [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]