skshapes.triangle_mesh.geometry.dihedral_angles

skshapes.triangle_mesh.geometry.dihedral_angles(*, points, triangles, edge_topology=None)

Dihedral angles of the edges of a triangular mesh.

The dihedral angle of an edge is a discrete version of the second fundamental form, it is a function of the angle between the normals of adjacent triangles to an edge. More explanation can be found in the paper “Linear Surface Reconstruction from Discrete Fundamental Forms on Triangle Meshes” (https://www.cse.msu.edu/~ytong/DiscreteFundamentalForms.pdf)

Parameters:
  • points (Float32[Tensor, '_ 2'] | Float32[Tensor, '_ 3'] | Float32[Tensor, '_ _ 2'] | Float32[Tensor, '_ _ 3']) – Points or sequence of points with shape (n_points, n_poses, dim).

  • triangles (Int64[Tensor, '_ 3']) – Triangles of the mesh.

  • edge_topology (EdgeTopology | None) – Edge topology of the mesh. If not provided, it will be computed from the triangles.

Return type:

Float32[Tensor, '_'] | Float32[Tensor, '_ _']

Returns:

The dihedral angles of the edges with shape (n_edges,) for a single mesh or (n_edges, n_poses) for a sequence of meshes.