arap_precompute#
- iskra.deformation.arap.arap_precompute(verts: Tensor, faces: Tensor, handle_idx: Tensor, lap_clamp: float | None = 1e-05) tuple[Tensor, Tensor, Tensor, Callable[[Tensor], Tensor]][SOURCE]#
Precomputes data necessary to run ARAP deformations.
Important
It is necessary to clamp the ARAP weights to be positive. Otherwise, the SVD procedure is not guaranteed to lead to the closest rotation. We allow setting it to None to match the libigl implementation, but this is likely to break your gradients in the backward pass.
- Parameters:
- Returns:
(
Tensor[V, 2]) – Vertex-to-vertex adjacency fromvertex_adjacency. (
Tensor[2:abbr:V (Number of vertices)]) – Cotan weights per vertex-vertex relationship. (
SparseTensor[V, V]) – Cotan (integrated) Laplacian matrix. (spla.SolverT) – Factorized Laplacian solver.