centroid_polygon_edges

compas.geometry.centroid_polygon_edges(polygon)[source]

Compute the centroid of the edges of a polygon.

Parameters

polygon (sequence[[float, float, float] | compas.geometry.Point]) – A sequence of polygon point coordinates.

Returns

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

Notes

The centroid of the edges is the centroid of the midpoints of the edges, with each midpoint weighted by the length of the corresponding edge proportional to the total length of the boundary.