skspatial.objects.Plane.distance_point_signed

Plane.distance_point_signed(point: Union[numpy.ndarray, Sequence]) numpy.float64[source]

Return the signed distance from a point to the plane.

Parameters
pointarray_like

Input point.

Returns
np.float64

Signed distance from the point to the plane.

References

http://mathworld.wolfram.com/Point-PlaneDistance.html

Examples

>>> from skspatial.objects import Plane
>>> plane = Plane([0, 0, 0], [0, 0, 1])
>>> plane.distance_point_signed([5, 2, 0])
0.0
>>> plane.distance_point_signed([5, 2, 1])
1.0
>>> plane.distance_point([5, 2, -4])
4.0
>>> plane.distance_point_signed([5, 2, -4])
-4.0