In a triangle with three points A, B, and C. The L2 distance between each pair of points |AB|, |AC|, |BC| is given. For the other two points O and P, the distance to the three points is given, i.e. |AO|, |BO|, |CO|, |AP|, |BP|, |CP| is also known. Now compute the distance between O and P |OP| using the pre-given distance.
The key here is I need an equation that only contains the distance variables (with no computation on the angle such as sin(), cos(), arcsin(), arccos()) as I am implementing the computation with C++ code for calculation, and I want to reduce the number of computations in my implementation for efficiency.