How to get Coordinates for third point if I know the lengths and angle?

89 Views Asked by At

I know A and B coordinates along with length AB, length BC and angle ABC. How to get coordinates for point C? Angle ABC can be of any angle.

enter image description here

3

There are 3 best solutions below

0
On

The method is quite straightforward.

Calculate $m_1=$ slope of line $AB$. Now, assume slope of line $BC=m_2$. Apply the formula:

$$\tan\angle ABC=\left|\frac{m_1-m_2}{1+m_1m_2}\right|$$

Once $m_2$ is known, apply parametric coordinates on line $BC$:

$$C=(x_B+r\cos\theta,y_B+r\sin\theta)$$

where $\theta=\tan^{-1}m_2$.

Note: There will be two values of $m_2$. Can you justify this visually?

0
On

You can find $AC$ using Cosine theorem: $$AC^2=AB^2+BC^2-2AB\cdot BC\cos{ABC}.$$ Now make up two equations with two unknowns ($x_3,y_3$): $$\begin{cases}(x_3-x_2)^2+(y_3-y_2)=BC^2 \\ (x_3-x_1)^2+(y_3-y_1)^2=AC^2\end{cases}$$

0
On

Compared to the other answers, this seems long, but it works quite well. I assume you might want to do this in a computer. Computers are blind as a bat and can't see your lines and angles, and thus they don't naturally know up from down.

If you merely specify the angle ABC as a number, say for example $30^{\circ}$, then there isn't enough information to answer the question. Looking at your top 2 drawings, $\angle ABC$ might be given as $30^{\circ}$ for both of them. Clearly, point C is not the same!

If you use a counterclockwise convention for naming angle ABC, then there is a method that should always work. Understand that $\angle ABC$ must be specified in radians starting at line AB and going counter-clock around to line AC.

  1. Let $\beta = \angle AC$. Determined counter-clock starting at the segment from B to A. i.e. B is the center of this clock.

  2. Let vector $\mathbf v=A-B$ It is important that you use $A-B$ and not $B-A$. Those are two different vectors.

  3. We can find the angle from the x-axis to $\mathbf v$ using a modern tangent. $\alpha = atan2(\mathbf v_y,\mathbf v_x)$. If you don't know this function, look it up. Every CAS program, and most scientific calculators do it correctly. FYI, excel does it backwards. Notice that input to the atan2 funtion is (y,x) not (x,y).

  4. Now add angles $\alpha + \beta=\gamma$ The summed angle may be greater than $2\pi$. It would be in your upper right figure. It really won't matter.

  5. Obtain a direction vector going from $B$ to $C$ Name it $w$. It will be $$\mathbf w = \frac{\left(cos(\gamma),sin(\gamma)\right) }{\Vert \left(cos(\gamma),sin(\gamma)\right) \Vert}$$

  6. Finally, $$C = B+(\text{length BC})\cdot \mathbf w$$