• Parameters

    • pts: [[number, number, number], [number, number, number], [number, number, number]]

      three 3D triangle points

    • radii: [number, number, number]

      three distances to each of the triangle points

    Returns [number, number, number]

    the 3D location of the point inside the triangle, undefined if bad inputs.

    Description

    Given a point has known distances to three triangle points, and given the location of that triangle's points in space, find the location of the point in space. This method works for 3D faces and points. https://stackoverflow.com/questions/9747227/2d-trilateration