distance_point_line_sqrd

compas.geometry.distance_point_line_sqrd(point, line)[source]

Compute the squared distance between a point and a line.

Parameters
  • point (sequence of float) – XYZ coordinates of the point.

  • line (list, tuple) – Line defined by two points.

Returns

float – The squared distance between the point and the line.

Notes

For more info, see 1.

References

1

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