Find a point on a perpendicular line a given distance from another point?

5.9k Views Asked by At

I have a line from $(x_{1}, y_{1})$ to $(x_{2}, y_{2})$. I need to find two more points $(x_{3}, y_{3})$ and $(x_{4}, y_{4})$ which are a known distance (d) from one of the endpoints of my line, at a $90\, ^{\circ}$degree angle. See image:

Here is the image to illustrate what I am describing.

I can't work out a good way to do this. I considered some trig functions, or some way of using the other line with slope$ -\frac{1}{m}$, but am generally terrible at math. Vector solutions from other threads only confused me; I have and need the points in $(x, y)$ format. Head me in the right direction? Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

Let: $$ m = \frac{y_2 - y_1}{x_2 - x_1} $$ Then by taking negative reciprocals and using the point-slope formula, the equation of the perpendicular line is: $$ y - y_2 = -\frac{1}{m}(x - x_2) $$ We want to find the two intersection points that this line makes with the circle centred at $(x_2, y_2)$ with radius $d$: $$ (x - x_2)^2 + (y - y_2)^2 = d^2 $$ Plugging the equation of the line into the equation of the circle yields: \begin{align*} (x - x_2)^2 + (-\tfrac{1}{m}(x - x_2))^2 &= d^2 \\ (x - x_2)^2 + \tfrac{1}{m^2}(x - x_2)^2 &= d^2 \\ (1 + \tfrac{1}{m^2})(x - x_2)^2 &= d^2 \\ (x - x_2)^2 &= \frac{d^2}{1 + \frac{1}{m^2}} \\ x - x_2 &= \pm \sqrt{\frac{d^2}{1 + \frac{1}{m^2}}} \\ x &= x_2 \pm \sqrt{\frac{d^2}{1 + \frac{1}{m^2}}} \\ \end{align*} Finally, to get their corresponding $y$ coordinates, simply plug each of these two $x$ coordinates back into the equation of the line and solve for $y$.