project_point_line

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

Project a point onto a line.

Parameters
  • point ([float, float, float] | Point) – XYZ coordinates of the point.

  • line ([point, point] | Line) – Two points defining the projection line.

Returns

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

Notes

For more info, see 1.

References

1

Wiki Books. Linear Algebra/Orthogonal Projection Onto a Line. Available at: https://en.wikibooks.org/wiki/Linear_Algebra/Orthogonal_Projection_Onto_a_Line.