normal_polygon
- compas.geometry.normal_polygon(polygon, unitized=True)[source]
Compute the normal of a polygon defined by a sequence of points.
- Parameters:
- polygonsequence[point] |
compas.geometry.Polygon
A list of polygon point coordinates.
- unitizedbool, optional
If True, unitize the normal vector.
- polygonsequence[point] |
- Returns:
- [float, float, float]
The normal vector.
- Raises:
- ValueError
If less than three points are provided.
See also
Notes
The points in the list should be unique. For example, the first and last point in the list should not be the same.