tetrahedron_project#
- iskra.geometry.distances.tetrahedron_project(x: Tensor, tetrahedra: Tensor) Tensor[SOURCE]#
Projects a 3D point onto the closest point in a tetrahedron.
- !!! tip
Internally broadcasts
x,tetrahedratogether, meaning it can be used to project many points onto a single tetrahedron, one point onto many tetrahedra or many points to many tetrahedra, all by adding singleton dimensions to the batches before calling the function. Bs3 are the output batch dimensions obtained by broadcasting Bs1 and Bs2 together.
- Parameters:
- Raises:
ValueError – We only support 3D tetrahedra. Feel free to raise an issue if you have a valid use case for 4D ones!
- Returns:
(
Tensor[Float, [Bs3, Dim]]) – Closest projection ofxonto its corresponding tetrahedron.