area_polygon_xy
- compas.geometry.area_polygon_xy(polygon)[source]
Compute the area of a polygon lying in the XY-plane.
- Parameters
polygon (sequence[point] |
compas.geometry.Polygon
) – A sequence of XY(Z) coordinates of 2D or 3D points representing the locations of the corners of a polygon. The vertices are assumed to be in order. The polygon is assumed to be closed: the first and last vertex in the sequence should not be the same.- Returns
float – The area of the polygon.