edge_length_normals#

iskra.geometry.normals.edge_length_normals(edges: Tensor) Tensor[SOURCE]#

Normals of line segments in 2D scaled by the edge length.

This function is useful when computing length-weighted vertex normals.

Parameters:

edges (Tensor[Float, [Bs, 2, 2]]) – Line segments in 2D; second to last dimension is the end points, last is the coordinates.

Returns:

(Tensor[Float, [Bs, 2]]) – Scaled normal vectors of each line segment.