centroid_points_weighted

compas.geometry.centroid_points_weighted(points, weights)[source]

Compute the weighted centroid of a set of points. The weights can be any between minus and plus infinity.

Parameters
  • points (sequence[[float, float, float] | Point]) – A list of point coordinates.

  • weights (sequence[float]) – A list of weight floats.

Returns

[float, float, float] – The coordinates of the weighted centroid.