distance_point_plane
- compas.geometry.distance_point_plane(point, plane)[source]
Compute the 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=0where
D=−Ax0−Bx0−Cz0Q=(x0,y0,z0)N=(A,B,C)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 absolute 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
>>>