closest_point_on_plane

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

Compute closest point on a plane to a given point.

Parameters
Returns

[float, float, float] – XYZ coordinates of the closest point.

Notes

For more info, see 1.

References

1

Wikipedia. Distance from a point to a plane. Available at: https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_plane

Examples

>>> plane = ([0.0, 0.0, 0.0], [0.0, 0.0, 1.0])
>>> point = [1.0, 2.0, 3.0]
>>> closest_point_on_plane(point, plane)
[1.0, 2.0, 0.0]