Computing endpoint coordinates of point P of a line of known length d that ends perpendicularly at the known mid-point coordinates of another line

87 Views Asked by At

Is there a simple formula that gives the coordinates of a point P, which is the endpoint of a line of length d that passes perpendicularly through the midpoint of another line? The distance d of the endpoint P from the midpoint m of the perpendicular line is known.

For instance, if the coordinates of the endpoints of the perpendicular line are $(x_1,y_1)$ and $(x_2,y_2)$, then it is easy to figure out the coordinates of the mid-point $((x_1+x_2)/2, (y_1+y_2)/2)$. See the figure for clarification.enter image description here

1

There are 1 best solutions below

4
On

Hints

  • The slope of $d$ is given by $$m_d=\frac{x_1-x_2}{y_2-y_1}$$

  • The midpoint $M$ of the segment has the coordinates $$M\bigg(\frac{x_1+x_2}{2} \mid \frac{y_1+y_2}{2}\bigg)$$

  • If $P$ has the coordinates $P(x_p\mid y_p)$, then $$d^2=\big (\frac{x_1+x_2}{2}-x_p\big)^2+\big(\frac{y_1+y_2}{2}-y_p\big)$$