I have $P_1=(x_1,y_1)$ and $P_2=(x_2,y_2)$ points and they are specified.
Also I have $h$ distance from $P_1$ point that is also known.
And I want to find $P_3$ and $P_4$ that located on perpendicular line and $h$ is distance to them.
How can i found those
$P_4=?$
$P_3=?$
-
$\begingroup$ Is P5 standing for P3 ? What did you try for the time being ? $\endgroup$– Claude LeiboviciOct 27, 2013 at 13:15
-
$\begingroup$ I dont have P5 its just index mistake. P4 and P3 I am searching for. $\endgroup$– IevgenOct 27, 2013 at 13:17
-
$\begingroup$ @Evgeny, read what you wrote. b.t.w. are you familiar with dot product in vectors? $\endgroup$– Carlos Eugenio Thompson PinzónOct 27, 2013 at 13:20
-
$\begingroup$ @Carlos Eugenio Thompson Pinzón dont get it how Dot product will helps when P3 and P4 is unknown. $\endgroup$– IevgenOct 27, 2013 at 13:32
1 Answer
Hints:
From the drawing you want to find $\;P_3,P_4\;$ s.t. $\;P_3P_4\perp P_1P_2\;$ and also s.t that $\;P_1\;$ belongs to the line determined by $\;P_3,P_4\;$, so:
$$\begin{align*}\bullet&\;\;\text{Find the slope of the line segment $\;P_1P_2\;$}\;:\;m_1:=\frac{y_2-y_1}{x_2-x_1}\;,\;\;x_1\neq x_2\\ \bullet&\;\;\text{Find the equation of the line through $\;P_1\;$ with slope}\;\;-\frac1{m_1}\;:\;y-y_1=-\frac1{m_1}\left(x-x_1\right)\\ \bullet&\;\;\text{Find the two points on the above line at a distance of $\,h\,$ from $\,P_1\,$ by solving the quadratic:}\\ &h^2=(x_1-x)^2+(y_1-y)^2\;,\;\;\text{with}\;\;y=-\frac x{m_1}+\frac{x_1}{m_1}+y_1\end{align*}$$