1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Find a point on a line given, distance from startpoint

  1. Aug 10, 2011 #1
    Hi,

    I have a line L stretching from point A to ponit B. The startpoint A has the coordinates x1, y1 and endpoint B has the coordinates x2, y2.

    I want a formula for calculating the coordinates for point P. Point P lies on the line L and with the distance Z from startpoint A.

    BR Boston
     
  2. jcsd
  3. Aug 10, 2011 #2
    your equation is f(x)=y=(y2-y1)/(x2-x1)(x-x1) + y1 [this is just using y-y0 = m(x-x0)]

    Now, a distance Z should be determined by a displacement +/-Z. There are two answers as written, if it is meant "in the direction of b" then replace +/-Z with just Z

    Let t = arctan[(y2-y1)/(x2-x1)], this is the angle of the slope.

    Then replace x in f(x) with x1+(+/-Z)cos(t). That is, you are finding y when x is at the point when you are +/-Zcos(t) from the coordinate x1. That is how much it changes when you move up or down the slope a displacement of +/-Z. Your point is (x1+(+/-Z)cos(t), f(x1+(+/-Z)cos(t))
     
    Last edited: Aug 10, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook