Generate two valid vertices of isosceles triangle, given one vertex, an angle, and a distance

107 Views Asked by At

Trigonometry question:

I want to find a way to randomly sample the coordinates of the two remaining vertices $C_2$ and $C_3$ of an isosceles triangle, given one initial coordinate $C_1$. I have the coordinate of one vertex ($C_1$), the angle between the vertex and the two remaining vertices (let's call it $\theta$), and the distance between $C_1$ and the two remaining vertices $C_2$ and $C_3$ (let's call it $R$: by isosceles triangle I mean, $R$ describes both the distance from $C_1$ to $C_2$ as well as from $C_1$ to $C_3$)

How do I randomly choose two valid points $C_2$ and $C_3$ that satisfy the conditions of being theta degrees apart (relative to $C_1$) and being the same distance $R$ from $C_1$?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Given $C_1$, $\theta$ and $|C_1C_2|=|C_1C_3|=R$, the locus of the points $C_2,C_3$ is the circumference of the circle centered at $C_1$, and the location of one of the points $C_2,C_2$ is defined by the location of the other.

enter image description here

So, for example, you can choose randomly an angle $\phi$ to locate the point $C_3$,

\begin{align} C_3&=C_1+R\cdot(\cos\phi,\sin\phi) \end{align}
then the coordinates of the other point would be \begin{align} C_2&=C_1+R\cdot(\cos(\phi+\theta),\sin(\phi+\theta)) . \end{align}