Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2006-04-20 02:11:02



i posted a while ago finding points on a line as i need to calculate if a given (X,Y) is on a line that spans from (x1,y1) to (x2,y2) i have the following

0= (y2-y1)/(x2-x1)X+ (y1-[(y2-y1)/(x2-x1)]*x1) -Y

but it only seems to work for horizontal lines my maths is pretty bad and i would really appreciate it if any one could explain  or even better tell me how i could make it work as i am really lost.

#2 2006-04-20 02:35:31

Registered: 2005-06-28
Posts: 18,670

Re: points

The equation of the line joining the points

is given by

Now, after forming the equation of the line joining the two points,
substitute the values (x,y) and see if the equation is satisfied. If yes, the point lies on the straight line, if no, it doesn't.

It is no good to try to stop knowledge from going forward. Ignorance is never better than knowledge - Enrico Fermi. 

Nothing is better than reading and gaining more and more knowledge - Stephen William Hawking.


Board footer

Powered by FluxBB