Finding points on a right triangle

48 Views Asked by At

I have the points A, B and C. I also have the angle alpha between AB and BD or BE, and I know l = |BD| or |BE|.

But how can I find D or E?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

This will be an answer that uses vector calculus. Let $a,b,c$ be the vector-coordinates from the origin $O$ to $A,B,C$ respectively.

As you want to rotate around $B$, it is useful to translate $B$ to the origin, and to translate back when you have found the coordinates.

As $A$ and $C$ are on the line $BA$ that you want to rotate, it is indifferent if you choose $A$ or $C$. I will choose $A$.

$a - b$ will be the vector from $B$ to $A$. You want to rotate this over $\alpha$ degrees, so you need a rotation matrix $R = \begin{pmatrix}\cos(\alpha) & -\sin(\alpha) \\ \sin(\alpha) & \cos(\alpha) \end{pmatrix}$. $R v$ will rotate vector $v$ over $\alpha$ degrees in positive direction (that is, counter-clockwise), so $R(a-b)$ will be the directional vector of $B$ in the direction of $D$. Scaling and translating is left. First scale with factor $\frac{l}{|AB|}$, then translate back the origin to $B$. What you will find is this:

$$d = \frac{l}{|AB|}R(a-b) + b ~~.$$

In this, $R(a-b)$ is a matrix multiplication of matrix $R$ with vector $a-b$.

Now vector $d$ contains the coordinates of $D$.

You can do the same for $C$ by using $R^T$ or by taking $-\alpha$ instead of $\alpha$.

Because I'm lazy I've computed the case of $d$ using Mathematica: $$d = \frac{l}{|AB|} \left( -\left(a_2-b_2\right) \sin (\alpha )+\left(a_1-b_1\right) \cos (\alpha )+b_1 ~,~ \left(a_1-b_1\right) \sin (\alpha )+\left(a_2-b_2\right) \cos (\alpha )+b_2 \right)$$