0
$\begingroup$

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.

$\endgroup$

1 Answer 1

2
$\begingroup$

You can move and rotate the plane such that $A = (0, 0), B = (|AB|, 0)$, and then find all other points using circle-circle intersections — find two candidates for $C$, arbitrarily choose one, then find two candidates for $O, P$, check for consistency with $C$, and finally calculate the distance — which only requires square root computation.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .