triangle_normals#

iskra.geometry.normals.triangle_normals(triangles: Tensor) Tensor[SOURCE]#

Normals of triangles in 2D or 3D.

Normals of 2D triangles will always be [0, 0, 1].

Parameters:

triangles (Tensor[Float, [Bs, 3, 2 | 3]]) – Triangles in 2D or 3D; second to last dimension is the corners, last is the coordinates.

Returns:

(Tensor[Float, [Bs, 3]]) – Normal vectors of each triangle.