centroid_polygon_edges

compas.geometry.centroid_polygon_edges(polygon)[source]

Compute the centroid of the edges of a polygon.

Parameters

polygon (list of point) – A sequence of polygon point coordinates.

Returns

list – 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.