Results 1 to 4 of 4

Math Help - Calculating coords of a point on a straight line at a distance from start point...

  1. #1
    Newbie
    Joined
    Feb 2008
    Posts
    2

    Exclamation Calculating coords of a point on a straight line at a distance from start point...

    Hi,

    I have a straight line whose start and end points are known. (Pt1 and Pt2)...

    Is it possible to calculate the coordinates of a point that is on on this straight line at a distance of 1000 from pt1 or pt2...

    thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    is up to his old tricks again! Jhevon's Avatar
    Joined
    Feb 2007
    From
    New York, USA
    Posts
    11,663
    Thanks
    3
    Quote Originally Posted by ayrus View Post
    Hi,

    I have a straight line whose start and end points are known. (Pt1 and Pt2)...

    Is it possible to calculate the coordinates of a point that is on on this straight line at a distance of 1000 from pt1 or pt2...

    thanks
    yes...

    use the distance formula. for the y-coordinate, plug in the equation of the line
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Feb 2008
    Posts
    2
    Quote Originally Posted by Jhevon View Post
    yes...

    use the distance formula. for the y-coordinate, plug in the equation of the line
    Hi jhevon,

    thank you for your comment...

    I need to write a program what could calculate the values as described in the topic...

    If I were to calculate,

    Distance Formula: Dist ^2 = (y2-y1)^2 + (x2-x1)^2
    and substituting y=mx+c in the above equation...


    This looks little tedious programmatically; I am wondering if there are any alternate ways of solving the problem...

    thanks
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,383
    Thanks
    1474
    Awards
    1
    Suppose that P(a,b) & Q(c,d) are the end points of the line segments.
    Define D = \sqrt {\left( {a - c} \right)^2  + \left( {b - d} \right)^2 }.
    Now define l(t) = \left( {a + t\frac{{c - a}}{D},b + t\frac{{d - b}}{D}} \right)\quad ,t \in \mathbb{R}, equation of the line determined by P & Q.
    Note that l(D) = Q so that l(1000) is the point 1000 units from P in the Q direction.
    Whereas l(-1000) is the point 1000 units from P in the direction opposite of Q (that is P is between that point and Q).
    If you need distances from Q then just change the definition of the line.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: October 18th 2011, 11:45 AM
  2. Replies: 5
    Last Post: October 5th 2011, 03:01 AM
  3. Replies: 6
    Last Post: May 16th 2011, 04:57 AM
  4. Replies: 1
    Last Post: January 17th 2011, 10:33 AM
  5. Replies: 1
    Last Post: March 18th 2010, 04:29 AM

Search Tags


/mathhelpforum @mathhelpforum