iskra.geometry.distances#

clamped_length(x[, dim, keepdim, eps])

Computes the lengths of a set of vectors and then clamps them.

clamped_length_sqr(x[, dim, keepdim, eps])

Computes the _squared_ lengths of a set of vectors and then clamps them.

closest_edge(x, edges)

Finds the closest edges to a set of points.

closest_simplex(x, simplices)

Finds the closest simplex to a set of points.

closest_triangle(x, triangles)

Finds the closest triangles to a set of points.

edge_project(x, edges)

Projects a point onto the closest point on an edge.

edge_to_line(edges)

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

hyperplane_project(x, origin, normal)

Projects points x onto (hyper)planes defined in the origin-normal form.

point_dist(x, y[, ord, keepdim])

Computes the distance between batches of vectors x_i and y_i.

point_dist_matrix(x, y[, ord])

point_edge_dist(x, edges)

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

point_edge_dist_matrix(x, edges)

Pairwise distances between a set of points and a set of edges.

point_simplex_dist(x, simplices)

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

point_simplex_dist_matrix(x, simplices)

Pairwise distances between a set of points and a set of simplices.

point_tetrahedron_dist(x, tetrahedra)

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

point_tetrahedron_dist_matrix(x, tetrahedra)

Pairwise distances between a set of points and a set of tetrahedra.

point_triangle_dist(x, triangles)

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

point_triangle_dist_matrix(x, triangles)

Pairwise distances between a set of points and a set of edges.

simplex_codim(simplices)

Codimension of a set of simplices.

simplex_project(x, simplices)

Projects a point onto the closest point on a simplex.

tetrahedron_project(x, tetrahedra)

Projects a 3D point onto the closest point in a tetrahedron.

tetrahedron_udf(x, tetrahedra)

Unsigned distance function of a 3D point to the boundary of a tetrahedron.

triangle_project(x, triangles)

Projects a point onto the closest point on an triangle.

triangle_to_plane(triangles)

Computes the origin-normal representation of a plane passing through a triangle.

triangle_udf(x, triangles)

Unsigned distance function of a 2D point to the boundary of a triangle.