Find coordinates of right angle vertex in a right triangle.

computational geometrygeometrytrianglestriangulationtrigonometry

I have a right triangle like shown in the image:

Right triangle

I know the coordinates of $\mathbf V_1$ and $\mathbf V_3$, as well as the lengths of all sides $(A, B, C)$ and angles of the vertices $(a, b, c)$. In this case, $\mathbf V_1$ is fixed, and $\mathbf V_3$ rotates around $\mathbf V_1$; the angle $c$ is always a right angle; there is no 3D component. How would I go about calculating the coordinates of $\mathbf V_2$?

I found this answer, but I fail to see how the solution would fall on the circle with center $\left(\frac{x_1+x_2}2,\frac{y_1+y_2}2\right)$. Wouldn't that only apply if angles $a$ and $b$ were the same?

First time posting a question here, so I hope I've provided enough information.

Edit: Follow up question.

\begin{align}
V_1=(x_1,y_1), V_2=(X,Y),V_3=(x_3, y_3)\\
\overrightarrow{V_1V_3}^2&=\overrightarrow{V_2V_3}^2+\overrightarrow{V_1V_2}^2\\
\sqrt{(x_1-x_3)^2+(y_1-y_3)^2}^2&=\sqrt{(x_3-X)^2+(y_3-Y)^2}^2+\sqrt{(X-x_1)^2+(Y-y_1)^2}^2\\
\end{align}

I've come up to this equation where my unknowns are (X,Y). However, this leaves me with 1 equation and 2 unknowns. Is there another property that I can use to solve for X and Y?

Best Answer

Assuming that angle $a$ turns clockwise from $\overrightarrow{V_1V_3}$ to $\overrightarrow{V_1V_2}$, there is a simple linear map that can be used to find point $V_2$. This map can be found using the following steps:

  1. Shift $V_3$ by adding $-V_1$.
  2. Rotate the resulting point clockwise around the origin by angle $a$.
  3. Scale the resulting point (seen as a vector) by a factor of $B/C$, so its distance from the origin shrinks from $C$ to $B$.
  4. Shift the resulting point back by adding $V_1$

The clockwise rotation by angle $a$ is done using the linear map defined by the matrix $$ \begin{pmatrix} cos(a) & sin(a) \\ \ \llap{-}sin(a) & cos(a)\end{pmatrix} = \frac{1}{C}\begin{pmatrix}B & A \\ \ \llap -A & B\end{pmatrix} $$ Now, following the steps from above, we find that $$ V_2 = \frac{B}{C^2}\begin{pmatrix}B & A \\ \ \llap -A & B\end{pmatrix}(V_3-V_1) + V_1 $$ So, for the coordinates, we get: $$ \begin{align} x_2 &= \frac{B^2(x_3-x_1)+AB(y_3-y_1)}{C^2}+x_1 \\ \text{and} \\ y_2 &= \frac{B^2(y_3-y_1)-AB(x_3-x_1)}{C^2}+y_1 \end{align} $$

Related Question