With this formula I tried to calculate the third point in a triangle:
https://math.stackexchange.com/a/1553606/126977
I know the length between the two point points and the angles at this corners:
Known points are:
point1 = { x: 4925.707458496093, y: 281.38922119140636}
point2 = { x: 5065.31622314453, y: 423.47991943359386}
The known angles are:
angle1 = 137.76476741527148
angle2 = 40.725761857792335
I wrote a javascript programm to test it:
var oo = ( Math.atan2(point2.y - point1.y, point2.x - point1.x));
oo = oo + toRadians(winkel1);
var d = (get_Distance(point1, point2) * Math.sin(toRadians(angle1)) ) / Math.sin(toRadians(180) - toRadians(angle1) - toRadians(angle2));
Then I calculate the points with:
var x = (point1.x + d * Math.cos(oo));
var y = (point1.y + d * Math.sin(oo));
But somehow I don't get 0,0 as output I get: 5250.0599801529925, 5204.454252468392
Even after changing some variables, I cant figure out the correct result What do I wrong? Thanks
Here you can run the code:http://jsfiddle.net/hacjk7yr/
