Finding a coordinate over a right angle in a triangle where the other two coordinates are known

4,004

If you know the coordinates of $A$ and $B$ you can find the length $c$, and since you know $a$, and that $a^2+b^2=c^2$, you can find $c$.

Look at your picture. Thinking of the line from $A$ to $B$ as a mirror, find the image of $C$ in that mirror, and you see that the distances $a$ and $b$ would be the same at that point as at the point $C$ that you've drawn, so there must be two solutions.

One way to proceed is brute force: Let $C=(c_1,c_2)$, $B=(b_1,b_2)$, $A=(a_1,a_2)$. Then \begin{align} b^2 & = (c_1-a_1)^2+(c_2-a_2)^2, \\[2pt] a^2 & = (c_1-b_1)^2+(c_2-a_2)^2. \end{align} Expanding the right sides, we get this system of quadratic equations: \begin{align} b^2 & = c_1^2 - 2c_1 a_1 + a_1^2 + c_2^2 - 2c_2 a_2 + a_2^2, \\[4pt] a^2 & = c_1^2 - 2c_1 b_1 + b_1^2 + c_2^2 - 2c_2 b_2 + b_2^2. \end{align} Subtracting lefts sides and right sides, we get $$ b^2-a^2 = 2c_1 (b_1 - a_1) + (a_1^2-b_1^2) + 2c_2(b_2-a_2) + (a_2^2-b_2^2). $$ This is linear in $c_1$ and $c_2$. If you solve it for $c_2$ in terms of $c_1$, then substitute that for $c_2$ in either of the quadratic equations above, you reduce it to a quadratic equation in $c_1$, which has two solutions.

Share:
4,004

Related videos on Youtube

tau-badger
Author by

tau-badger

Updated on August 01, 2022

Comments

  • tau-badger
    tau-badger over 1 year
          a
     B ------- C
       \      |
        \     |
         \    |
        c \   | b
           \  |
            \ |
             \|
              A
    

    Alright, this is a triangle I have, and these are the things that are known: the coordinates of A and B, the lengths of a and c, as well as the fact that the angle under C is always a right angle. I need to find the coordinates of C.

    If you choose to answer this, please be detailed in your explanation of the answer. Thank you.

    Edit: I am using this in video game programming. The two objects are parts of a sentry gun. C is at the base of the barrel of the gun, and at a fixed distance (a) from B. B is the gimbal for the gun, and its position does not change. A represents an enemy, whose position does change, and the position of C needs to change on the gimbal (B) to continue pointing at the enemy.

    I hope that made my intentions a bit clearer.

    So far, all three answers are outside my scope of understanding. My knowledge is really lacking, perhaps too much for me to be able to tackle this problem. I would still like to try, however.

    It would help me a lot to see this problem solved using real coordinates. Thank you for your answers so far.

    • AlexR
      AlexR about 8 years
      Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level.
    • tau-badger
      tau-badger about 8 years
      @AlexR Thank you for the guidelines, I have updated my question.
  • AlexR
    AlexR about 8 years
    Both points of intersection (assuming a nondegenerate triangle, there are precisely two) will form a right triangle by thales theorem. The solution isn't unique. ($\pm 0$)