smooth_frame_field#

iskra.directional.smooth_frame_field(vertices: 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) Tensor[SOURCE]#

Smooth a frame field with sparse hard constraints.

Parameters:
  • vertices (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. See edge_flaps().

  • connection (Tensor[Complex, [E]]) – Discrete connection. You can use face_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 be transported. Use to_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. Use to_intrinsic_frame_field() with n=2 to project extrinsic vectors to intrinsic ones.

Returns:

(Tensor[Complex, [F, 2]]) – Smoothed vectors.