closest_point_in_cloud_xy

compas.geometry.closest_point_in_cloud_xy(point, cloud)[source]

Calculates the closest point in a list of points in the XY-plane.

Parameters
  • point (sequence of float) – XY(Z) coordinates of a the base point.

  • cloud (sequence) – A list of points forming the cloud, with each point represented by its XY(Z) coordinates.

Returns

tuple – The distance to the closest point. The XYZ coordinates of the closest point (with Z = 0). The index of the closest point in the cloud.

Notes

Check kdTree class for an optimized implementation (MR).