distance_point_plane_signed

compas.geometry.distance_point_plane_signed(point, plane)[source]

Compute the signed distance from a point to a plane defined by origin point and normal.

Parameters
  • point (list) – Point coordinates.

  • plane (tuple) – A point and a vector defining a plane.

Returns

float – Distance between point and plane.

Notes

The distance from a point to a plane can be computed from the coefficients of the equation of the plane and the coordinates of the point 1.

The equation of a plane is

\[Ax + By + Cz + D = 0\]

where

\begin{align} D &= - Ax_0 - Bx_0 - Cz_0 \\ Q &= (x_0, y_0, z_0) \\ N &= (A, B, C) \end{align}

with \(Q\) a point on the plane, and \(N\) the normal vector at that point. The distance of any point \(P\) to a plane is the value of the dot product of the vector from \(Q\) to \(P\) and the normal at \(Q\).

References

1

Nykamp, D. Distance from point to plane. Available at: http://mathinsight.org/distance_point_plane.

Examples

>>>