Function geometry_predicates::predicates::insphere
source · [−]Expand description
Adaptive exact 3D insphere test. Robust.
Return a positive value if the point pe
lies inside the
sphere passing through pa
, pb
, pc
, and pd
; a negative value
if it lies outside; and zero if the five points are
cospherical. The points pa
, pb
, pc
, and pd
must be ordered
so that they have a positive orientation (as defined by
orient3d()
), or the sign of the result will be reversed.
The result returned is the determinant of a matrix.
this determinant is computed adaptively, in the sense that exact
arithmetic is used only to the degree it is needed to ensure that the
returned value has the correct sign. Hence, insphere()
is usually quite
fast, but will run more slowly when the input points are cospherical or
nearly so.