# normal_triangle_xy

compas.geometry.normal_triangle_xy(triangle, unitized=True)[source]

Compute the normal vector of a triangle assumed to lie in the XY plane.

Parameters
• triangle ([point, point, point] | compas.geometry.Polygon) – A list of triangle point coordinates. Z-coordinates are ignored.

• unitized (bool, optional) – If True, unitize the normal vector.

Returns

[float, float, float] – The normal vector, which is a vector perpendicular to the XY plane.

Raises

AssertionError – If the triangle does not have three vertices.