point_triangle_dist#

iskra.geometry.distances.point_triangle_dist(x: Tensor, triangles: Tensor) Tensor[SOURCE]#

Distance of a point to its closest point on an triangle.

Implements point_dist(x, triangle_project(x, triangles)) using iskra.point_dist and iskra.triangle_project. See documentation of these two functions for more information.

Parameters:
  • x (Tensor[Float, [Bs1, Dim]]) – Set of points.

  • triangles (Tensor[Float, [Bs2, 3, Dim]]) – Set of triangles.

Returns:

(Tensor[Float, [Bs3]]) – Distance of x to closest point on its corresponding triangle. Bs3 is the broadcasted shape when broadcasting Bs1 and Bs2.