edge_to_line#

iskra.geometry.distances.edge_to_line(edges: Tensor) tuple[Tensor, Tensor][SOURCE]#

Computes the origin-normal representation of a line passing through edges.

Parameters:

edges (Tensor[Bs, 2, 2]) – Set of edges in 2D.

Returns:
  • (Tensor[Float, [Bs, 2]]) – Line origins, taken to be edges[..., 0, :].

  • ​​ (Tensor[Float, [Bs, 2]]) – Line normals.