Finding a Point in the Line at a Specific Distance

distance Finding a Point in the Line at a Specific DistanceImagine you have a point and need to have another one at a certain distance apart and both must belong to the same line.

One possible solution is to draw a circle with that distance as the radius and check where it intersects the line, though it gives you 2 possible solutions for the problem. But there is another option.

By knowing the distance we can find the other point by projecting the line. The problem is we don’t have the angle of the line to complete the equation. However there is an interesting property that wasn’t covered in that post:

m = tan α  <=>  α = arctan m

By using the slope formula we can find the value of the angle and then use the projections equations to determine the missing coordinates:

sen α = (y2 - y1) / d  <=>  y2 = d * sen α + y1
cos α = (x2 - x1) / d  <=>  x2 = d * cos α + x1

The advantage of this method is you only get one solution. The point will be either to the left or right of the existing point depending if the distance is negative or not.

You may also like...