After a week of searching and experimenting it's clear that I'm stuck. I've got 4 known points [A,B,C,D]
in space and their respective distances to an unknown point X
. My mathematics knowledge is basic at best so had frustrating times trying to understand some of the 3d maths out there so can anyone explain the algorithm needed with a step-by-step example in c++ the way to find that point X?
Thanks.
E.g: Point A {-39, 24.9062, -0.65625}
, point B {-13.5, 25.2812, -4}
and point C {-11.5625, 43.8125, 11.625 }
. Distances AX
= 21.5116
, BX
= 43.8125
, and CX
= 11.625
.
As people have pointed out there is the solution of working out the X
point intersection with spheres but as I said my maths is not really that good so a working example would be appreciated.
I reckon another possible solution would be to first find out the distance between the base of the plane where the ABC
triangle lies on and point X
. This distance would essentially be the height of the tretrahedron ABCX
makes. Then from there use trigonometry to work out the elevation angles of the AX
, BX
and CX
vertices to work out the m
of the y = mx + b
lines. Again this is where my maths skills fizzle out.
Indicating the Matlab/Mathematica example is all well and good but as it uses its own library of math function and assumes good working knowledge of the math craft to solve the problem it just simply doesn't help me I'm afraid. I'm looking for a step-by-step solution for this exact problem in C++ (or C).
Nowhere I've looked (including SO) has anyone explained comprehensively the solution to this 3-dimensional problem from absolute start to absolute finish. Not everyone is good at maths that's why I would prefer a working example so i can go through and get a better grasp.
Regardless thank you all for the various links and suggestions both past and future.