Trigonometry – Calculate Coordinates of Third Point in a Scalene Triangle

trianglestriangulationtrigonometry

I am writing a program and I need to calculate the 3rd point of a triangle if the other two points, all sides and angles are known.

            A (6,14)
            ^
           / \
    14.14 /   \ 10.14
         /     \
        /       \
B (16,4)--------- C (x,y)
          10.98

A (6,14), B (16,4). Side AB is 14.14, AC is 10.14 and BC is 10.98
Angle A, B, C are 50, 45 and 85 degrees respectively…

I want to calculate the position of C. I don't know which formula to use for this. Actually i am performing triangluation. I am calculating the position of an incoming object (C).

Best Answer

Thanks everyone for the help! I found the answer. The formula for which is given here (Section: Intersection of two circles. It's not in the plot, but $d$ is the euclidean distance between the centers of the circles or $d=a+b$).

enter image description here

a = (r02 - r12 + d2 ) / (2d)

h = r0 sinP0 (or) r1 sinP1

P2 = P0 + a ( P1 - P0 ) / d i.e., x2 = x0 + a (x1 - x0) / d (and) y2 = y0 + a (y1 - y0) / d

x3 = x2 ± h ( y1 - y0 ) / d

y3 = y2 ± h ( x1 - x0 ) / d