skspatial.objects.Plane.distance_point_signed

Plane.distance_point_signed(point: Union[ndarray, Sequence]) 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])
np.float64(0.0)
>>> plane.distance_point_signed([5, 2, 1])
np.float64(1.0)
>>> plane.distance_point([5, 2, -4])
np.float64(4.0)
>>> plane.distance_point_signed([5, 2, -4])
np.float64(-4.0)