the cotangent Laplacian
The Laplacian is the operator that compares a function's value at a point to the average of its neighbors — heat flows down its gradient, drums vibrate in its eigenmodes, and smooth functions are the ones it kills. On a triangle mesh you need a discrete Laplacian that respects the actual geometry, not just who-is-next-to-whom. The cotangent Laplacian is that operator: a weighted graph Laplacian whose edge weights are built from the angles of the triangles, and it is the single most important matrix in geometry processing.
For a function u stored at the vertices of a triangle mesh, the cotangent Laplacian is (L u)(i) = (1/2) * sum over neighbors j of (cot(alpha_ij) + cot(beta_ij)) * (u_i - u_j), where alpha_ij and beta_ij are the two angles opposite the edge (i, j) in the two triangles that share it. Often one divides by a vertex (Voronoi or barycentric) area A_i to approximate the smooth Laplace-Beltrami operator pointwise, giving the symmetric system (1/A_i) L. This formula is not ad hoc: it is exactly what you get from linear finite elements (the stiffness matrix of piecewise-linear hat functions), from discrete exterior calculus as d^T *_1 d, and from minimizing the Dirichlet energy (1/2) integral of |grad u|^2 — three derivations meeting at the same cotangents. Its eigenfunctions are the discrete analogues of Laplace-Beltrami eigenfunctions, the basis for spectral mesh methods.
The cotangent Laplacian is everywhere: heat-method geodesics, mean-curvature flow and fairing (apply L to the coordinates and you get the mean-curvature normal), harmonic and conformal parameterization, spectral shape descriptors, mesh deformation, and Poisson surface reconstruction all rest on it. The famous caveat is the obtuse-triangle problem: if a triangle has an angle bigger than pi/2, its cotangent is negative, an off-diagonal weight can become negative, and the discrete maximum principle fails — interpolated values can overshoot, and the operator may even lose positive semidefiniteness for some quantities. The standard fixes are to use Delaunay (or intrinsic Delaunay) triangulations, which guarantee nonnegative cotangent weights, or to clamp the weights, accepting a controlled bias.
To compute a smooth field on a mesh with fixed boundary values, solve L u = 0 with those boundary constraints: the solution is the discrete harmonic function, the minimizer of Dirichlet energy. The same matrix, applied to the three coordinate functions, returns the mean-curvature normal at each vertex — which is why 'apply the Laplacian to the positions' is the one-line recipe for mesh smoothing.
One matrix, many uses: harmonic fields, smoothing, and curvature all come from the cotangent Laplacian.
Negative cotangent weights from obtuse triangles break the discrete maximum principle and can ruin solver behavior, even though the formula still 'converges' under refinement. Use (intrinsic) Delaunay meshes for guaranteed nonnegative weights; do not assume the cotangent Laplacian is harmless on an arbitrary mesh.