laplacian module provides functions for computing the cotangent Laplacian and area matrices on triangle meshes. These discrete operators are fundamental to spectral mesh processing and differential geometry computations.
Mathematical Background
The cotangent Laplacian is a discrete approximation of the Laplace-Beltrami operator on surfaces. For a mesh function f, the discrete Laplacian is:Functions
area_matrix
Input mesh as either a tuple
(vertices, faces) where vertices is an (n,3) array of coordinates and faces is an (m,3) array of triangle indices, or an object with vertices and faces attributes.(n,n) sparse diagonal matrix of vertex areas in dia format
cotangent_laplacian
Input mesh as either a tuple
(vertices, faces) or an object with vertices and faces attributes.If True, use the robust Laplacian computation from Sharp & Crane (2020) which handles non-manifold meshes. Requires the
robust-laplacian package to be installed.Mollification factor used when computing the robust Laplacian. Only applies when
robust=True. Larger values make the operator more numerically stable but less accurate.(n,n) sparse cotangent Laplacian matrix in CSC format
(n,n) sparse diagonal area matrix
compute_vertex_areas
Input mesh as either a tuple
(vertices, faces) or an object with vertices and faces attributes.If True, use the robust Laplacian computation to derive vertex areas. Requires the
robust-laplacian package.Mollification factor for robust computation. Only applies when
robust=True.(n,) array of vertex areas
References
- Cotangent weights formulation adapted from pyFM (MIT License)
- Sharp, N., & Crane, K. (2020). “A Laplacian for Nonmanifold Triangle Meshes.” Computer Graphics Forum.