[Math] Finding relative coordinates in triangle

analytic geometrygeometrytriangles

Known: $r$, coordinates of $A$, angle $BAC$=72°
Task: find coordinates of B and C.

So, I have 4 unknown parameters to compute, but only 3 equations.

$r^2$=$(x_a-x_b)^2+(y_a-y_b)^2 $
$(2.49r)^2 = (x_a-x_c)^2 + (y_a – y_c)^2$
$(2.28r)^2 = (x_b-x_c)^2 + (y_b – y_c)^2$

How to get the fourth equation? Or maybie is there a simplier algorithm? Working in my way may be very time-consuming and wearisome.

It's not a homework, this problem has naturally occured when making an OpenGL program.

enter image description here

Best Answer

$\def\A{{\bf A}} \def\B{{\bf B}} \def\C{{\bf C}} \def\R{{\bf R}} \def\D{{\bf D}} \def\f{\phi}$As others have mentioned, if the task is to find the coordinates of $B$ and $C$, this problem is underdetermined.

Let's first consider the triangle with point $A$ located at the origin and point $C$ lying along the positive $x$-axis. Then the coordinates of the points can be found with simple trigonometry, $$\begin{eqnarray*} \A_0 &=& (0,0) \\ \B_0 &=& (c \cos A, c\sin A) \\ \C_0 &=& (b,0). \end{eqnarray*}$$ The angle $A$, and the sides $b$ and $c$ have been given. This is an SAS triangle. The triangle can be solved by finding $a$ with the law of cosines and one of the other angles with the law of sines.

(Added: For completeness, $A = 72^\circ$, $b = 2.61r$, and $c=r$. The law of cosines gives $a = \sqrt{b^2+c^2-2bc\cos A} = 2.49r$. Then $\frac{\sin A}{a} = \frac{\sin B}{b}$ implies $B = 86^\circ$. Lastly, $A+B+C = 180^\circ$ implies $C = 22^\circ$.)

The collection of triangles you are interested in have vertices of the form $$\begin{equation*} \D = \A + \R(\f)\D_0 \tag{1} \end{equation*}$$ where $\A = (A_x,A_y)$ is the given location of $A$, and where $\R(\f)$ is a rotation matrix. The transformation (1) is a counterclockwise rotation by the angle $\f$, followed by a shift so the point $A$ has the given coordinates. In components, $$\begin{eqnarray*} A_x &=& A_x \\ A_y &=& A_y \\ B_x &=& A_x + c\cos A\cos\f - c\sin A\sin\f \\ &=& A_x + c\cos(A+\f) \\ B_y &=& A_y + c\cos A\sin\f + c\sin A\cos\f \\ &=& A_y + c\sin(A+\f) \\ C_x &=& A_x + b\cos \f \\ C_y &=& A_y + b\sin \f. \end{eqnarray*}$$

Below we plot the triangle before rotation and translation in black. (We set $r = 1$ in the figure.) The dotted triangle has been rotated counterclockwise by $\f = 30^\circ$, and then translated so the new location of point $A$ is $(2,1)$. For reference,
$$\begin{eqnarray*} A_x &=& 2 \\ A_y &=& 1 \\ c &=& r = 1 \\ b &=& 2.61 \\ A &=& 72^\circ \\ \f &=& 30^\circ. \end{eqnarray*}$$

enter image description here

Related Question