centroid_polygon_edges_xy
- compas.geometry.centroid_polygon_edges_xy(polygon)[source]
Compute the centroid of the edges of a polygon prohected to the XY plane.
- Parameters
polygon (sequence[[float, float] or [float, float, float] |
compas.geometry.Point
]) – A sequence of polygon point coordinates. The Z coordinates will be ignored.- Returns
[float, float, 0.0] – The XYZ coordinates of the centroid in the XY plane.
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.