I am trying to do some experiments with path. I have two points (x0,y0) and (x2,y2). Now I have to find a point (x1,y1) that should be some distance from the final point (x2,y2).
For example
Start Point (0,0) End Point (0,5)
Point i want to find is (0,2)
For a line between
The point at distance d
from the first point, (positive) in the direction of the second point, is given by:
Where L
is the distance between the two points defining the line:
(For your case just take L - d
instead of d
)