pointcloudset.geometry.plane module

Utility functions for geometric calculations with planes.

pointcloudset.geometry.plane.distance_to_point(point_a: ndarray, plane_model: ndarray, normal_dist: bool = True) float

Calculate the distance from a plane to a point. https://mathworld.wolfram.com/Point-PlaneDistance.html

Note

Uses the plane equation a x + b y + c z + d = 0.

Parameters
Returns

Distance between plane and point.

Return type

float

Raises

ValueError – If point does not have 3 values or if plane does not have 4 values.

pointcloudset.geometry.plane.intersect_line_of_sight(line: ndarray, plane_model: ndarray) ndarray

Calculate the point of intersection between a line and a plane.

Note

Uses the plane equation a x + b y + c z + d = 0.

Parameters
Returns

[px, py, pz], point of intersection of line of sight and plane.

Return type

numpy.ndarray

Raises

ValueError – If line does not have 3 values or if plane does not have 4 values.