Overview
Laplacian decomposition is the foundation of spectral mesh processing in MeshMash. By decomposing the mesh Laplacian operator into its eigenvalues and eigenvectors, we can analyze and manipulate mesh geometry in the frequency domain.The Mesh Laplacian
MeshMash computes the cotangent Laplacian, a discrete differential operator that generalizes the Laplace-Beltrami operator to triangular meshes.Cotangent Weights
The cotangent Laplacian uses cotangent weights that naturally arise from discrete differential geometry:The cotangent Laplacian is derived from the discrete Laplace-Beltrami operator and provides a natural discretization of geometric properties on triangle meshes.
Robust Laplacian
For non-manifold or poorly-conditioned meshes, use the robust Laplacian:The robust Laplacian implementation requires the
robust-laplacian package. It handles edge cases and numerical issues better than the standard cotangent Laplacian.Area Matrix
The area matrixM is a diagonal matrix where each entry represents the lumped area of a vertex:
Eigendecomposition
The eigendecomposition solves the generalized eigenvalue problem:λᵢare eigenvalues (frequencies)φᵢare eigenvectors (eigenfunctions)- Lower eigenvalues correspond to smooth, low-frequency functions
- Higher eigenvalues correspond to oscillatory, high-frequency functions
Basic Decomposition
Decompose a mesh into its spectral components:Direct Laplacian Decomposition
If you already have the Laplacian matrices:Band-by-Band Decomposition
For large meshes or high-frequency analysis, compute eigenvalues in bands:How It Works
The band-by-band algorithm is based on the spectral geometry processing approach by Levy & Zhang (2009):- Shift-Invert Mode: ARPACK is efficient at finding eigenvalues near a target
sigma - Overlapping Bands: Each band overlaps with the previous to ensure continuity
- Adaptive Sigma: The next
sigmais chosen to be in the middle of the next band - Efficiency: Much faster than computing all eigenvalues at once for high frequencies
The band-by-band approach is particularly useful when you need eigenvalues up to a specific maximum frequency, as it only overshoots by at most one band.
Parameters
- max_eigenvalue: Maximum frequency to compute up to
- band_size: Number of eigenvalues per band (typically 50)
- truncate_extra: Whether to truncate to exactly
max_eigenvalue - verbose: Show progress bar and diagnostic information
Understanding Eigenvalues
Eigenvalues represent frequencies of oscillation on the mesh:Properties
- First Eigenvalue: Always 0 (constant function)
- First Eigenvector: Constant function weighted by vertex areas
- Low Eigenvalues: Smooth, global shape information
- High Eigenvalues: Fine details, local features
Understanding Eigenvectors
Eigenvectors are functions defined on the mesh vertices:Eigenvectors are orthogonal with respect to the mass matrix M, meaning: φᵢᵀ M φⱼ = 0 for i ≠ j
Performance Optimization
LU Prefactoring
For faster decomposition, use LU prefactoring:Data Types
Usefloat32 for large meshes:
Common Use Cases
Mesh Filtering
Reconstruct mesh with only low frequencies:Shape Analysis
Eigenvalues are intrinsic shape descriptors:References
- Cotangent Laplacian: Adapted from pyFM (MIT License)
- Band-by-Band Algorithm: Spectral Geometry Processing with Manifold Harmonics, Vallet and Levy, 2008
- Robust Laplacian: A Laplacian for Nonmanifold Triangle Meshes, Sharp and Crane, 2020