find 3rd vertex of point with two lengths and one angle known

79 Views Asked by At

I have a triangle as such:

example of the triangle

What I want to achive is the range of possible positions of c.

meaning, the minimum point of this range is where:

A is known.

B is known.

the angle a is 50 deg.

AB's length is X

and AC's length must be 2X.

The end of the range is when:

The angle a is 150 deg and AC is 20X.

I'm using python to write a code that get's all the points in this range,

so if I can get a formula to find the minimum position and apply it to find the max position too, I can then easily create the range between the two in my script.

1

There are 1 best solutions below

0
On BEST ANSWER

You handle this by reducing it to a simpler problem:

  • Translate so $A$ is at the origin.
  • Rotate about the origin so that $B$ is on the positive $x$-axis.
  • Rescale so that $B$ is $(1,0)$.

The possible points $C$ are then given by $(2\cos a, 2\sin a)$ for all values of $a$ from $5^\circ$ to $150^\circ$ ... and all values of $a$ from $-150^\circ$ to $-5^\circ$ as well. Your definition is abiguous and will have two ranges for the points $C$. These two ranges actually cover most of the circle. In the direction of $A$ there is a $10^\circ$ arc that is not included, and in the direction of $B$ there is a $60^\circ$ arc that is not included. But the remaining $290^\circ$ are included in the two ranges.

Once you have the range identified in the simpler case, you undo the steps taken to reduce to it:

  • Multiply everything by the distance $AB$.
  • Rotate the $x$-axis to the direction of $B$ from $A$.
  • Translate the origin out to the original position of $A$.

For your example of $A = (1,1), B = (4,4)$, note that the distance $AB$ is $\sqrt{(4-1)^2 + (4 - 1)^2} = 3\sqrt 2$. And $B - A = (4 - 1, 4 - 1) = (3,3)$, whose angle from the $x$-axis is \atan2(3,3), or $45^\circ$.

The rotation of $45^\circ$ means the intervals will be from $a = (5+45)^\circ = 50^\circ$ to $a = (45 + 150)^\circ = 195^\circ$. And multiplying by the distance $AB$ gives $(6\sqrt 2\cos a, 6\sqrt 2\sin a)$. Lastly we need to add $A$ back in, which makes the points $C$ you are looking for in this case to be:

$$(1 + 6\sqrt 2\cos a, 1 + 6\sqrt 2\sin a)$$ for $50^\circ \le a \le 195^\circ$ and for $-105^\circ \le a \le 40^\circ$.