skshapes.triangle_mesh.geometry

Geometric properties of a triangular mesh.

This module provides functions to compute geometric properties of a triangle mesh such as triangle areas, edge lengths, dihedral angles, etc.

In addition, it is possible to compute these properties for a set of triangle meshes at the same time, if they have the same topology. This is useful when we need to compute the same property along a sequence of deformation of a triangle mesh.

All the function in this module are implemented in PyTorch. They take the points and triangles of the mesh as input and return a tensor with the computed property.

Arguments points can be either a tensor of shape: - (n_points, dim) for a single mesh - (n_points, n_poses, dim) for a sequence of poses of the same mesh

Functions

cotan_weights(*, points, triangles[, ...])

Cotan weights of a triangular mesh

dihedral_angles(*, points, triangles[, ...])

Dihedral angles of the edges of a triangular mesh.

edge_centers(points, triangles[, edge_topology])

Centers of the edges of a triangular mesh.

edge_lengths(*, points, triangles[, ...])

Lengths of the edges of a triangular mesh.

triangle_areas(*, points, triangles)

Areas of the triangles of a triangular mesh.

triangle_centers(*, points, triangles)

Centers of the triangles of a triangular mesh.

triangle_normals(*, points, triangles)

Triangle normals of a triangular mesh.