Techniqueadvanced
Manifold harmonics
Also called spectral mesh processing, Laplace-Beltrami eigenfunctions.
Uses the eigenfunctions of the cotangent Laplacian as a Fourier basis on a mesh, as Vallet and Levy did, for filtering, compression and shape descriptors.
Manifold harmonics is a technique that does Fourier analysis on a curved surface. On a line or a circle, the sines and cosines are the eigenfunctions of the second derivative, and their frequencies are the eigenvalues. On a surface, the operator that takes the place of the second derivative is the Laplace-Beltrami operator, and its eigenfunctions are the harmonics of the surface. On a triangle mesh, the cotangent Laplacian is the discrete form of this operator. It gives a stiffness matrix and a mass matrix , and the harmonics are the solutions of the generalized eigenvalue problem . A function on the vertices, such as one coordinate of the vertex positions, then has coefficients , and it can be rebuilt as . Small are the low frequencies, the coarse shape; large are the fine detail. Vallet and Lévy (2008) built the basis with the mass matrix and called it the manifold harmonic basis. Because the basis is orthonormal in the inner product of , the transform is exactly invertible and has the same properties as the discrete Fourier transform, on any mesh and with any sampling.
In plain words
A guitar string has a set of natural tones: the low base tone and higher tones above it. Any sound of the string is a mix of these tones, and a sound filter changes the mix.
A curved surface also has natural tones. The lowest tone is the same value on the whole surface. The next tones go up on one side and down on the other side. Higher tones make more and smaller waves, like ripples on a drum.
Manifold harmonics finds these tones for a triangle mesh. A value at each vertex, for example the height of each point, is then written as a mix of tones. Keep only the low tones and the mesh becomes smooth. Make the high tones stronger and the details stand out. Keep few tones and the mesh needs little storage. The list of tones also describes the shape.
When it applies
- The data are values at the vertices of a triangle mesh: the vertex positions, a color, a curvature, a temperature. The positions are treated as three separate signals.
- The task is about frequencies: to smooth, to sharpen, to compress, to compare shapes, or to find a function that changes slowly on the surface.
- The result must not depend on how the mesh is sampled. This needs the cotangent weights and the mass matrix, not the uniform graph Laplacian.
- The number of harmonics needed is small compared with the number of vertices, or the mesh is small enough for a dense eigensolver.
The template
MANIFOLD-HARMONICS(mesh with vertices p_1..p_n, signal x on the vertices, count m, transfer function h)- 1
C ← the stiffness matrix: C_ij = −(cot α_ij + cot β_ij) / 2 for an edge ij, C_ii = −Σ_{j≠i} C_ij - 2
M ← the mass matrix: the diagonal of the vertex areas, or the finite element mass matrix - 3
(λ_k, φ_k) for k = 1..m ← the m smallest solutions of C φ = λ M φ, with φ_kᵀ M φ_l = 1 if k = l and 0 if not - 4
x̃_k ← φ_kᵀ M x for k = 1..m - 5
y ← Σ_{k=1..m} h(λ_k) x̃_k φ_k - 6
return y
Why it works. is symmetric and positive semidefinite: is the Dirichlet energy of the piecewise linear function with values , and the cotangent formula of line L1 is exactly this integral. is symmetric positive definite. So the eigenvalues are real and not negative, and the eigenvectors can be chosen with , where has the columns . Then , which is why line L4 multiplies by . The transform is exactly invertible, the M-norm of a signal is the sum of its squared coefficients, and the energy is . The partial sum of the first terms is the closest signal to that uses only the first harmonics. On a connected mesh, and is constant. The proof gives the details.
Line L2. The mass matrix is the area that each vertex stands for. A diagonal ("lumped") mass gives each vertex one third of the area of its triangles, or its mixed Voronoi area; the finite element mass has for the hat functions . Both are symmetric positive definite when all triangles have positive area. Without , the eigenvectors of alone depend on the density of the vertices: a part of the mesh with many small triangles gets a different basis from the same part with few large ones.
Line L3. With a diagonal , set ; then is a standard symmetric eigenproblem, and its orthonormal eigenvectors give . With a full , the Cholesky factor does the same. For a large mesh, only the first eigenpairs are computed, with the Lanczos algorithm and a shift-invert transform, which needs a sparse factorization of . When an eigenvalue is repeated, any M-orthonormal basis of its eigenspace is correct; the Gram-Schmidt process in the inner product gives one.
Line L5. The transfer function chooses the filter. for and above is an ideal low-pass filter; is heat diffusion for the time ; a bump above in a band of makes the details of that size stronger. With and , .
Example. Take the octahedron with the six vertices . All eight faces are equilateral with side and area , and all angles are with . So on the twelve edges and . The lumped mass gives each vertex a third of its four faces, , and the total area is . Then , where is the adjacency matrix of the octahedron. The eigenvalues of are , (three times) and (twice), so the manifold harmonic eigenvalues are
The eigenvectors are the constant, the three coordinate functions , , at the vertices, and the functions and . On the unit sphere, the eigenvalues are with the same eigenfunctions, so the octahedron gets the first two levels right, and the third one too low.
Now let the signal be at the top vertex and at the other five. Its parts in the three eigenspaces are at every vertex (for ), (for ), and (for ). At the top vertex they add up to , and at the equator to . Their squared M-norms are , and , and they add up to , as Parseval's identity says. A low-pass filter that keeps gives : the value at the top, on the equator and at the bottom. The sharp spike is spread over the whole shape.
On larger meshes the eigenvalues approach those of the sphere. On the icosphere with 162 vertices on the unit sphere, with the mixed Voronoi mass, a dense solve gives , (three times), (five times), (three times), (four times) and , against , , , and on the sphere. The seven harmonics of degree split into a group of three and a group of four, because the symmetry group of the icosahedron has no irreducible representation of dimension . The function is a spherical harmonic of degree ; its M-norm is , and after it is projected on the first harmonics, the M-norm of the rest is .
Cost. The matrices of lines L1 and L2 take time on a mesh with vertices. A dense solve of line L3 takes time and space, which is practical only for a few thousand vertices. For the first harmonics of a large mesh, Lanczos needs one sparse factorization for each shift, and the orthogonalization against vectors costs ; storing the basis takes . Lines L4 and L5 take time for each signal.
Classic examples
- Filtering the geometry. Vallet and Lévy apply lines L4 and L5 to the three coordinates of the vertices. A low-pass smooths the mesh, and a band that is made stronger exaggerates the features of one size. The low harmonics keep the coarse shape, so a few hundred of them already give a smooth version of a detailed model.
- Smoothing as a filter. Laplacian smoothing with a step multiplies each coefficient by , implicit fairing by , and Taubin smoothing by a product of two such factors that stays near at low frequencies. Taubin used this view to design his filter without computing any eigenvector.
- Compression. Karni and Gotsman project the vertex coordinates on the first eigenvectors of the combinatorial Laplacian and keep only the first coefficients. For a smooth mesh, these coefficients carry most of the energy. They split large meshes into patches, because the eigenvectors of the whole mesh cost too much.
- Shape signatures. The eigenvalues depend only on the intrinsic metric, so they do not change when the shape bends without stretching. Reuter, Wolter and Peinecke use the first eigenvalues, after a normalization of the scale, as a signature to search for similar shapes. The heat kernel signature of Sun, Ovsjanikov and Guibas uses at each vertex as a descriptor of points.
- Partitioning. The sign of the second harmonic cuts the surface into two parts along a narrow neck, as in spectral clustering of a graph.
Variations
- Lumped or consistent mass. The diagonal mass makes line L3 a standard symmetric problem and is cheaper; the finite element mass gives eigenvalues that are more accurate on a coarse mesh. Reuter and his coauthors use higher order finite elements for more accuracy still.
- Graph Laplacian. Taubin and Karni-Gotsman use the uniform or combinatorial Laplacian with . It needs no geometry, but its basis follows the connectivity, so the same surface with a different triangulation gets a different basis.
- Boundary conditions. On a mesh with a boundary, the template as written gives the Neumann harmonics, which are free on the boundary. For Dirichlet harmonics, which are on the boundary, remove the rows and columns of the boundary vertices from and .
- Heat and diffusion. With , line L5 solves the heat equation for the time . The heat method uses one implicit step of the same equation, with a sparse solve instead of a basis.
- Matching shapes. The coefficients of functions in the bases of two shapes can be related by a small matrix. This is the idea of the functional maps of Ovsjanikov and his coauthors, which use the first harmonics of each shape.
Pitfalls
- Sign and order of the eigenvectors. is also a solution, and the vectors of a repeated eigenvalue are only defined up to a rotation of their space. Two meshes of the same shape can return different signs, different bases, or two close eigenvalues in a different order. Compare eigenspaces, or use quantities like summed over an eigenspace, not single vectors.
- The mass matrix in the transform. The coefficient is , not . With the plain dot product, the reconstruction is wrong, because the basis is not orthonormal in that product.
- Ringing. An ideal low-pass filter on a signal with a sharp edge makes ripples next to the edge, as in the Gibbs phenomenon of Fourier series. A smooth transfer function, like , avoids them.
- Bad triangles. A triangle with an angle near or gives a very large cotangent, and a triangle with zero area makes singular. Then the eigenvalues and eigenvectors are poor. Clean up or remesh the mesh first.
- Cost of many harmonics. Each harmonic is a dense vector of length , and the solve gets slower as grows. For a filter of the low frequencies only, a sparse solve such as implicit fairing is often cheaper than a basis.
- Rounding. A floating point eigensolver gives vectors that are M-orthonormal only up to rounding, and the vectors of close eigenvalues are sensitive to small changes of the mesh. Check against before trusting the transform.
Exercises
- Show that one step of implicit fairing, , gives .
- On the octahedron of the example, check that the vector with the values of at the vertices satisfies .
- Show that if all vertex areas are equal, , the manifold harmonics are the eigenvectors of , and the coefficient is .
- Show that the Rayleigh quotient is at least for every with on a connected mesh. What does this say about ?
- Scale a mesh by a factor . How do , and the eigenvalues change? Why must a shape signature normalize the scale?
Proof: The manifold harmonic basis is M-orthonormal, its frequencies are real and not negative, and the transform is exactly invertiblefull
Setup. A triangle mesh has vertices . Every vertex is in at least one triangle, and every triangle has positive area. For a vector of values at the vertices, also names the piecewise linear function that has these values at the vertices and is linear on each triangle. Let be the hat function of vertex , so .
The stiffness matrix is with for an edge , where and are the angles opposite the edge (one angle for a boundary edge), when is not an edge, and . The mass matrix is one of these:
- the lumped mass, a diagonal matrix whose entry is a sum of positive parts of the triangles at (one third of each area, or the mixed Voronoi area);
- the consistent mass .
The template solves and uses the transform , where the columns of are the eigenvectors .
Lemma 1 (the stiffness matrix is the Dirichlet energy). is symmetric and for every .
Proof. Take a triangle with vertices , area and unit normal . The hat function is at and on the edge , so on its gradient is perpendicular to , in the plane of , with length , where is the height from . This is . In the same way . Both vectors and lie in the plane, so for them, and
With the angle at , and , so the integral is . An edge is in one or two triangles, and is the angle opposite in each, so for . Since on every triangle, , so . Thus for all . This is symmetric in and , and .
Lemma 2 (the kernel of the stiffness matrix). exactly when is constant on each connected component of the mesh.
Proof. If is constant on each component, then on every triangle, so ; and if , then , because is symmetric positive semidefinite (Lemma 1): with , gives and . Conversely, gives . Each triangle has positive area and is constant on it, so there, and takes the same value at the three vertices. Two triangles that share a vertex give the same value to it, so the value is the same on each connected component.
Lemma 3 (the mass matrix is positive definite). is symmetric and for .
Proof. The lumped mass is diagonal, and each vertex has a positive entry because it is in a triangle and each triangle gives it a positive part. Then for . The consistent mass is symmetric by definition and . If , then on every triangle, because is continuous and each triangle has positive area, so at every vertex.
Lemma 4 (eigenvectors of different eigenvalues are M-orthogonal). If and with , then .
Proof. By the symmetry of and , . So , and .
Theorem 1 (the basis). There are real numbers and a matrix with columns such that
Each . The number of zero eigenvalues is the number of connected components, and on a connected mesh with , up to sign. Any set of eigenvectors that is M-orthonormal inside each eigenspace is M-orthonormal as a whole.
Proof. By Lemma 3, has a Cholesky factorization with invertible. Let . It is symmetric, because is. By the spectral theorem, with orthogonal and real diagonal; order the diagonal increasingly. Set . Then
Column of the first identity is . Multiply by and use : by Lemma 1.
The eigenvectors of satisfy , so by Lemma 2 they are the functions that are constant on each component. This space has dimension equal to the number of components , and the columns of for are linearly independent (they are M-orthonormal) and lie in it. A vector in this space with for all with is M-orthogonal to all columns of (Lemma 4 for the others), and since is invertible (), . So the columns for span the space, and there are exactly of them. On a connected mesh the space is spanned by , and its M-unit vectors are .
For the last claim, take eigenvectors that are M-orthonormal inside each eigenspace. Two of them from different eigenspaces are M-orthogonal by Lemma 4. So all pairs are M-orthogonal and each has M-norm .
Remark (repeated eigenvalues). A linear combination of eigenvectors of one eigenvalue is again an eigenvector of . So the Gram-Schmidt process in the inner product , applied inside each eigenspace, turns any basis of eigenvectors into an M-orthonormal one, and the last claim of Theorem 1 then gives the whole basis.
Theorem 2 (transform, inverse and Parseval). Let be as in Theorem 1, a signal, and , so . Then
- ;
- and ;
- for every , the vector is the unique closest vector to in the M-norm among the combinations of , and ;
- for every function , the filtered signal has the coefficients .
Proof. From , the square matrix is invertible with , so too. Then , which is item 1. For item 2, , and . For item 3, a combination has the coefficients for and for (because ), so by item 2 applied to ,
This is smallest exactly when for all , which is , and then it is . Item 4 is .
What is not proved here. The proofs are in exact arithmetic. An eigensolver in floating point returns vectors that are M-orthonormal only up to rounding, and the size of that error depends on the solver and on the gaps between the eigenvalues. How well the discrete eigenvalues approximate the eigenvalues of the smooth surface depends on the mesh and is a result of finite element theory, not of this proof.
References
- Bruno Vallet and Bruno Lévy, Spectral geometry processing with manifold harmonics, Computer Graphics Forum 27(2) (Eurographics 2008), 251 to 260, the manifold harmonic basis as the eigenvectors of the discrete Laplace-Beltrami operator, its orthonormality for the mass matrix, the manifold harmonic transform and its inverse, the filtering of the geometry with transfer functions, and the computation of the eigenvectors band by band
- Gabriel Taubin, A signal processing approach to fair surface design, SIGGRAPH 1995, 351 to 358, the eigenvectors of the mesh Laplacian as the natural frequencies of a mesh, smoothing as a low-pass filter, and the two-step filter that does not shrink the mesh
- Zachi Karni and Craig Gotsman, Spectral compression of mesh geometry, SIGGRAPH 2000, 279 to 286, the projection of the vertex coordinates on the eigenvectors of the combinatorial mesh Laplacian, the truncation of the coefficients for compression, and the partition of large meshes into patches
- Martin Reuter, Franz-Erich Wolter and Niklas Peinecke, Laplace-Beltrami spectra as Shape-DNA of surfaces and solids, Computer-Aided Design 38(4), 2006, 342 to 366, the beginning of the Laplace-Beltrami spectrum, computed with finite elements, as a signature of a shape that does not change under isometries
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H2 full proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag Q55GWK Edit this page History Report an error Markdown