smooth_frame_field#
- iskra.directional.smooth_frame_field(verts: Tensor, faces: Tensor, flaps: Tensor, connection: Tensor, source_idcs: int | Iterable[int] | Tensor | None = None, source_vals: complex | Iterable[complex] | Tensor | None = None, partial_idcs: int | Iterable[int] | Tensor | None = None, partial_vals: complex | Iterable[complex] | Tensor | None = None, soft_idcs: int | Iterable[int] | Tensor | None = None, soft_vals: complex | Iterable[complex] | Tensor | None = None, ortho_reg_lambda: float = 0.0, soft_reg_lambda: float = 0.0) Tensor[SOURCE]#
Smooth a frame field with sparse hard constraints.
Smoothing energy based on the paper “Modeling n-Symmetry Vector Fields using Higher-Order Energies” by Brandt et al. 2018.
- Parameters:
verts (
Tensor[Float, [V, 2 | 3]]) – Mesh vertices.faces (
Tensor[Int64, [F, 3]]) – Triangle faces.flaps (
Tensor[Int64, [E, 2]]) – Edge-to-face connectivity in the mesh. Seeedge_flaps().connection (
Tensor[Complex, [E]]) – Discrete connection. You can useface_tangent_bundle()to obtain a connection from a mesh.source_idcs (int | Iterable[int] |
Tensor[Int64, [S]]) – Indices of faces with hard constraints.source_vals (tuple[complex, complex] |
Tensor[Complex, [S, 2]]) – Complex polyvector coefficients to use as hard constraints. Useto_intrinsic_frame_field()to project extrinsic vectors to intrinsic ones.partial_idcs (int | Iterable[int] |
Tensor[Int64, [P]]) – Indices of faces with hard partial constraints.partial_vals (tuple[complex, complex] |
Tensor[Complex, [P]]) – Complex 2-RoSy polyvector coefficients to be transported. Useto_intrinsic_frame_field()withn=2to project extrinsic vectors to intrinsic ones.soft_idcs (int | Iterable[int] |
Tensor[Int64, [S]]) – Indices of faces with soft alignment constraints.soft_vals (tuple[complex, complex] |
Tensor[Complex, [S, 2]]) – Complex polyvector coefficients to use as soft constraints. Useto_intrinsic_frame_field()to project extrinsic vectors to intrinsic ones.ortho_reg_lambda (float) – Strength of the orthogonality regularizer. Regularization disabled when
ortho_reg_lambda=0.0.soft_reg_lambda (float) – Strength of the soft-alignment regularizer. Regularization disabled when
soft_reg_lambda=0.0.
- Returns:
(
Tensor[Complex, [F, 2]]) – Smoothed vectors.