Low-Level Geometry#
The low-level geometry functionality of iskra ✨.
Functions in this module deal directly with low-level geometric constructs necessary to build up higher level algorithms.
Except in a few select cases (like iskra.vertex_normals), the functions in this module are unaware of any mesh or mesh topology and operate directly on points, simplices, coordinate systems, or things like quaternions.
iskra.geometry.barycentric#
|
Computes the barycentric coordinates of points on simplices. |
|
Interpolate values onto a position given barycentric coordinates. |
|
Computes the barycentric coordinates of points on edges. |
|
Checks whether each of the points in x is in any of the simplices in simplices. |
|
Computes the barycentric coordinates of points in tetrahedra. |
|
Computes the barycentric coordinates of points on triangles. |
iskra.geometry.distances#
|
Computes the lengths of a set of vectors and then clamps them. |
|
Computes the _squared_ lengths of a set of vectors and then clamps them. |
|
Finds the closest edges to a set of points. |
|
Finds the closest simplex to a set of points. |
|
Finds the closest triangles to a set of points. |
|
Projects a point onto the closest point on an edge. |
|
Computes the origin-normal representation of a line passing through edges. |
|
Projects points |
|
Computes the distance between batches of vectors x_i and y_i. |
|
|
|
Distance of a point to its closest point on an edge. |
|
Pairwise distances between a set of points and a set of edges. |
|
Distance of a point to its closest point on an tetrahedron. |
|
Pairwise distances between a set of points and a set of simplices. |
|
Distance of a point to its closest point on an tetrahedron. |
|
Pairwise distances between a set of points and a set of tetrahedra. |
|
Distance of a point to its closest point on an triangle. |
|
Pairwise distances between a set of points and a set of edges. |
|
Codimension of a set of simplices. |
|
Projects a point onto the closest point on a simplex. |
|
Projects a 3D point onto the closest point in a tetrahedron. |
|
Unsigned distance function of a 3D point to the boundary of a tetrahedron. |
|
Projects a point onto the closest point on an triangle. |
|
Computes the origin-normal representation of a plane passing through a triangle. |
|
Unsigned distance function of a 2D point to the boundary of a triangle. |
iskra.geometry.volume#
|
Computes the lengths of a list of edges. |
|
Computes the volumes of a list of tetrahedra in 3D. |
|
Computes the volume of tetrahedra from edge lengths alone. |
|
Computes the areas of a list of triangles. |
|
Computes the areas of a list of triangles from edge lengths alone. |
|
Computes the generalized volumes of a list of simplices. |
|
Computes the generalized volume of simplices from edge lengths alone. |
iskra.geometry.angles#
|
Computes the interior angles in a triangle embedded in 3D. |
iskra.geometry.bbox#
|
iskra.geometry.coordinate_system#
Build frame (tangent and binormal) from only a normal. |
|
|
Build frame (normal, tangent and binormal) from triangles. |
iskra.geometry.element_quality#
|
|
|
iskra.geometry.normals#
|
Normals of line segments in 2D scaled by the edge length. |
|
Normals of line segments in 2D. |
|
Computes per-face normals. |
|
Normals of triangles in 2D or 3D scaled by the triangle area. |
|
Normals of triangles in 2D or 3D. |
|
Comptues per-vertex normals. |
|
Computes face normals weighted by the hypervolume of the element. |