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.
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.