Results 1 to 6 of 6

Thread: Distance formula (find 1 end point)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    80

    Distance formula (find 1 end point)

    Hi,

    I know the distance formula is

    d = Sqrt( ((x2 - x1) ^2) + ((y2 - y1) ^ 2))

    If I have values for distance, and y2 and y1, how do I determine x2 and x1?

  2. #2
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Distance formula (find 1 end point)

    You just don´t. You have to have X1 or X2. At least one of these two values has to be known, otherwise X1 can be any value and X2 will be easily found (or interchange X1 and X2).

    Rui
    ...este projecto dos Deuses que os homens teimam em arruinar...

  3. #3
    Fanatic Member VBAhack's Avatar
    Join Date
    Dec 2004
    Location
    Sector 000
    Posts
    617

    Re: Distance formula (find 1 end point)

    You don't have enough information to get x2 and x1. With the information provided, you can get x2 - x1, but that's it. You have a single equation with 2 unknowns ==> infinite number of solutions. You need a 2nd equation.

  4. #4
    New Member
    Join Date
    Sep 2008
    Posts
    1

    Re: Distance formula (find 1 end point)

    how to write a vbscript of distance formula

  5. #5
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Distance formula (find 1 end point)

    Your post title says "find 1 end point" but your problem statement is asking for the x coordinate of both points instead of the x and y coordinate of a single point. If you know one point's location and the distance, there are still an infinite number of answers, but instead they lie on a circle. Using the setup you've given, the points may lie on parallel (horizontal) lines.

    Not sure if that's helpful, though maybe it is for terminology.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  6. #6
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Distance formula (find 1 end point)

    The only quantity that's unambiguously determined is the positive difference of the x coordinates,

    |x2 - x1| = +Sqr[d2 - (y2 - y1)2]
    where the vertical bars mean absolute value.

    You can't even say whether x2 > x1 or x2 < x1
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width