1
$\begingroup$

Given $\triangle ABC$ with $\angle B = 90^\circ$, $\overline{AC}$ hypotenuse, known points $A = (x_a, y_a)$ and $B = (x_b, y_b)$, and known angle $\angle A = \theta$, how do I find $(x_c, y_c)$?

$\endgroup$
  • $\begingroup$ You have not given enough information: How is $(x_c,y_c)$ defined, let alone $A$ and $B$? $\endgroup$ – David G. Stork Aug 6 '18 at 19:36
  • $\begingroup$ I'm not sure I know what you mean. $(x_c, y_c)$ are the x- and y-coordinates of the point I'm trying to find, $A$ is an angle known ahead of time, and $B$ would then be $90 - A$ since this is a right triangle. $\endgroup$ – Benn Aug 6 '18 at 19:39
3
$\begingroup$

This is easiest with vectors. First calculate the vector from $B$ to $A$. This is simply: $$v_{BA}=(x_a-x_b, y_a-y_b)$$

Rotate that vector by 90 degrees. You do this by swapping its coordinates and negating one of them. Which one you negate doesn't matter, and the choice determines which of the two solutions you get: $$v^\perp_{BA} = (-(y_a-y_b),\ x_a-x_b) \text{ or } (y_a-y_b,\ -(x_a-x_b))$$

Note however that the vector you now have is still of length $|BA|$, though it is now pointing in the right direction to $C$ (if you start from $B$).

To scale the vector to the right length we need to multiply it by the factor $\frac{|BC|}{|BA|} = \tan\theta$: $$v_{BC} = v^\perp_{BA} \cdot \tan\theta$$

Lastly you add this vector to the coordinates of $B$ to get the coordinates of $C$:

$$(x_c,y_c) = (x_b-(y_a-y_b)\tan\theta, y_b+(x_a-x_b)\tan\theta)$$ or $$(x_c,y_c) = (x_b+(y_a-y_b)\tan\theta, y_b-(x_a-x_b)\tan\theta)$$

$\endgroup$
  • $\begingroup$ This is perfect and easy to implement efficiently. Thanks! $\endgroup$ – Benn Aug 7 '18 at 13:24
  • $\begingroup$ Good explanation. Drawing may help to understand it better. $\endgroup$ – yW0K5o Aug 7 '18 at 13:48
2
$\begingroup$

Write $$\sin^2\theta=(\frac{BC}{AC})^2=\frac{(x_c-x_b)^2+(y_c-y_b)^2}{(x_c-x_a)^2+(y_c-y_a)^2}\\\cos^2\theta=(\frac{AB}{AC})^2=\frac{(x_b-x_a)^2+(y_b-y_a)^2}{(x_c-x_a)^2+(y_c-y_a)^2}$$ You have two equations, with two unknowns. Notice that they are quadratic equations, so you will have two solutions, depending on which side of the $AB$ line you find point $C$.

$\endgroup$
1
$\begingroup$

C is on the perpendicular to segment AB by B. So $x_c, y_c$ can be parametrized by $\lambda$ : $x_c - x_b, y_c - y_b = \lambda * (y_b - y_a, x_a - x_b)$

Now compute the angle of angle CAB as a function of $\lambda$ and solve the equation (in $\lambda$) angle= $\theta$

$\endgroup$
  • $\begingroup$ Could you say more about this? I'm drawn to this approach as I'm going to end up implementing this as part of a drawing algorithm. $\angle CAB$ will be defined as a constant up front (probably something like $10^\circ$ or $15^\circ$). $\endgroup$ – Benn Aug 7 '18 at 0:56
  • $\begingroup$ from there you can use @Andrei's equation. Just replace $x_c$ and $y_c$ by the expression with lambda this way it makes a one unknown equation $\endgroup$ – Thomas Aug 7 '18 at 2:12
0
$\begingroup$

Picture 1Picture 1

Let's move system of axises to point $O'(x_a,y_b)$, the coordinates of the points $A, B, C$ will change respectively.

Picture 2Picture 2

Le's name $\angle O'AB=\alpha$. Also $\angle ABO' =90^o-\alpha$ and sum of angles on axis X must be $180^o$, $\angle CBX_c=\alpha$.

From $\triangle O'AB$ will find that $AB = \frac{y_b-y_a}{cos\alpha} (1)$

From $\triangle CBX_c$ will find that $BC = \frac{x_c-x_b+x_a}{cos\alpha} (2)$

From $\triangle ABC$ will find that $tg\theta= \frac{BC}{AB} (3)$

Put (1) and (2) into (3)

$tg\theta= \frac{BC}{AB}=\frac{\frac{x_c-x_b+x_a}{cos\alpha}}{\frac{y_b-y_a}{cos\alpha}} = \frac{x_c-x_b+x_a}{y_b-y_a}(4)$

From (4) $x_c = (x_b-x_a) + (y_b-y_a)*tg\theta (5)$

If we move to the original axises (see Picture 1) we need to add $x_a$ to (5)

So (5) become $x_c = (x_b-x_a) + (y_b-y_a)*tg\theta + x_a= x_b + (y_b-y_a)*tg\theta (6)$

Let's find $y_c$ from the condition that $\triangle O'AB$ is similar to $\triangle X_cBC$ because of $\angle O'AB = \angle X_cBC = \alpha$ and $\angle AO'B = \angle BX_cC = 90^o$

So $\frac{O'A}{BX_c}=\frac{O'B}{X_cC} (7)$ or

$\frac{y_b-y_a}{x_c-x_b+x_a}=\frac{x_b-x_a}{y_c} (7')$

From (7') $y_c=\frac{x_b-x_a}{y_b-y_a}* (x_c-x_b+x_a) (7'')$

Put (5) to (7'')

$y_c=\frac{x_b-x_a}{y_b-y_a}* ((x_b-x_a) + (y_b-y_a)*tg\theta-x_b+x_a) = (x_b-x_a)*tg\theta (7''')$

If we move to the original axises (see Picture 1) we need to add $y_b$ to (7''')

$y_c=(x_b-x_a)*tg\theta + y_b=y_b + (x_b-x_a)*tg\theta (8)$

Finding the second solution for $C'$ I leave to readers.

Questions, edit, comments?

$\endgroup$
  • $\begingroup$ Why do you align the triangle with the axes? The given points A and B can be anywhere and don't always have the same x-coordinate $\endgroup$ – Jaap Scherphuis Aug 8 '18 at 5:27
  • $\begingroup$ Thank you for noticing this. I post the correct picture later. $\endgroup$ – yW0K5o Aug 8 '18 at 7:54
  • $\begingroup$ I post new solution later. $\endgroup$ – yW0K5o Aug 8 '18 at 23:08
0
$\begingroup$

Do you know the length of the hypotenuse? If so, then there's actually more information than you need to solve the problem.

If you know the hypotenuse and the vertex coordinates of a leg:

The midpoint of the hypotenuse is equidistant from every vertex on a right triangle by Thales' Theorem. So be subtracting both sides from each other:

$$(x_c-x_b)^2+(y_c-y_b)^2=m^2/4=(x_c-x_a)^2+(y_c-y_a)^2$$

This gives you two solutions but each is resulting triangle is congruent to the other.

Alternatively, we know $(x_c,y_c)$ lies on a line perpendicular through B. From trigonometry, we know its length is $\tan{\theta}$ AB, where AB=length of AB.

$$(x_c,y_c)=(x_b,y_b)+\tan{\theta}AB(y_b-y_a,x_a-x_b)$$

It should be possible to derive the solution without having to handle any non-linear equations.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.