Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Point on a line

  1. Nov 21, 2004 #1
    Hey,
    I was wondering:
    If I had two points connected by a line on a cartesian plane(x and y for this) and i wanted to draw a third point, how could i tell if the third point was drawn somewhere on the line? I am programing a game where there is already a line drawn to connect to points and the user is supposed to draw a third point. i want to be able to check if it was drawn on the line or not.

    Thanks
    Jay
     
  2. jcsd
  3. Nov 21, 2004 #2
    Let p1 and p2 be the original two points, and p3 the third point. If the slopes between p1 and p2 is equal to that between p1 and p3 (or p2 and p3), then the three points lie on the same line.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Point on a line
  1. 3 Points in a line! (Replies: 4)

Loading...