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 (list of list) – A list of triangle point coordinates. Z-coordinates are ignored.

Returns

list – The normal vector, which is a vector perpendicular to the XY plane.

Raises

ValueError – If the triangle does not have three vertices.