barycentric_coordinates

compas.geometry.barycentric_coordinates(point, triangle)[source]

Compute the barycentric coordinates of a point wrt to a triangle.

Parameters
  • point ([float, float, float] | Point) – Point location.

  • triangle ([point, point, point]) – A triangle defined by 3 points.

Returns

[float, float, float] – The barycentric coordinates of the point.