Results 1 to 3 of 3

Math Help - Co-ordinates on a Curve knowing distance

  1. #1
    Junior Member
    Joined
    Mar 2009
    Posts
    42

    Co-ordinates on a Curve knowing distance

    Hi,

    I'm writing a software program. I have a "road" or edge represented by a series of co-ordinates (see below). Its a curved road.

    E.g.
    98.10, 222.65
    105.06,241.50
    106.70,263.0
    ....
    159.46,419.97

    I also know the length of the road e.g. 214m. I have a vehicle that should be at position 213 on the road i.e. right near the end. How do I work out the co-ordinates the vehicle should be at but taking into account the curve of the road?

    I currently do the following assuming a road is a straight line represented by (x1,xy) and (x2,y2) with road length l and vehicle position p. But this assumes a straight road.

    Vx = x1 + p(x2-x1)/l
    Vy = y1 + p(y2-y1)/l

    Many thanks in advance.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    Yes, it is likely that linear interpolations will prove unsatisfactory.

    Oftentimes, road specifications are written in terms of "Radius of Curvature". This idea may help you along your way...

    Three points define a circle. Thus, for each set of three points, calculate the equation of the circle that includes all three points. For your first three points listed, I get:

    Center: (31.59235,257.91659)
    Radius: 75.27947 <== Radius of Curvature

    If you keep your vehicle on this equation, when it is somewhere between the first and third points, this may improve your results.

    Some questions should come to your mind. If I use three consecutive points, say #1, #2, and #3, then creating the second circle is a problem.

    1) Should I used #2, #3, and #4? If so, which of the two paths should I use when I'm between #2 and #3? I've calculated it twice?

    or

    2) If I calculate circles independently, and don't overlap (Use #4, #5, adn #6 on the second circle) it seems unlikely that they will match up well at the end points. They should connect, but it is possible that I will get some very sharp turns.

    These are legitimate concerns. There are various solutions to these problems. In my mind, it is a job for "Cubic Splines". It is quite an interesting methodoldolgy for such problems. You should explore it. It may stetch your programming ability. It is a vast improvement over mere circles. Circles have constant radius. Cubic curves don't have to do that. You can match both points and first or second derivative at end points and make the whole thing as smooth as you like.

    Good luck. Keep us up with your progress.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    Whoops, I forgot to attach the picture of the circle solution.
    Attached Thumbnails Attached Thumbnails Co-ordinates on a Curve knowing distance-radius-curvature.gif  
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: August 23rd 2011, 02:58 AM
  2. Replies: 6
    Last Post: May 16th 2011, 05:57 AM
  3. distance for curve to point help
    Posted in the Pre-Calculus Forum
    Replies: 8
    Last Post: April 10th 2011, 03:09 PM
  4. Minimum Distance from Point to Curve
    Posted in the Pre-Calculus Forum
    Replies: 8
    Last Post: March 26th 2010, 05:38 AM
  5. Distance Along A Curve
    Posted in the Pre-Calculus Forum
    Replies: 6
    Last Post: February 1st 2010, 07:14 PM

Search Tags


/mathhelpforum @mathhelpforum