triangle_area_normals#

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

Normals of triangles in 2D or 3D scaled by the triangle area.

This function is useful when computing area-weighted vertex normals. Normals of 2D triangles will always be [0, 0, area].

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]]) – Scaled normal vectors of each triangle.