Skip to main content

The Laplacian

In Euclidean space, the Laplacian is defined as Δ=i2/(xi)2\Delta = - \sum_i \partial^2 / \partial(x_i)^2. The challenge with discretizing the Laplacian is that, the Laplacian takes the second derivative, but the discrete meshes don't have a natural second derivative.

Integration by Parts

One technique is to use integration by parts to lower the order of differentiation: On a manifold M\mathcal{M}, given functions f:MRf: \mathcal{M} \to \mathbb{R} and g:MRg: \mathcal{M} \to \mathbb{R},

ΩfΔgdA=boundary terms+ΩfgdA\int_\Omega f \Delta g dA = \text{boundary terms} + \int_\Omega \nabla f \cdot \nabla g dA

This formula coverts an expression that requires the second derivative to an expression that requires only the first derivative. On a discrete mesh, it is easier to cook up basis of functions on discrete mesh that at least have one derivative.

To use integration by parts, we convert a function f:MRf: \mathcal{M} \to \mathbb{R} to its dual function Lf:L2(M)R\mathcal{L}_{f}: L^2(\mathcal{M}) \to \mathbb{R} by integrating it against a "test" function g:MRg: \mathcal{M} \to \mathbb{R}:

Lf[g]=Mf(x)g(x)dA(x)\mathcal{L}_{f}[g] = \int_M f(x) g(x) dA(x)

Note that to evaluate the function ff at a point yy, we just need to use the delta function as the test function,

Lf[δy]=Mf(x)δy(x)dA(x)=f(y)\mathcal{L}_{f}[\delta_y] = \int_M f(x) \delta_y(x) dA(x) = f(y)

In our case, we want to evaluate Δf\Delta f , whose dual is

LΔf[g]=Mg(x)Δf(x)dA(x)=Mg(x)f(x)dA(x)+Mg(x)f(x)n(x)dl\mathcal{L}_{\Delta f}[g] = \int_{\mathcal{M}} g(\mathbf{x}) \Delta f(\mathbf{x}) dA(\mathbf{x}) = \int_{\mathcal{M}} \nabla g(\mathbf{x}) \cdot \nabla f(\mathbf{x}) dA(\mathbf{x}) + \oint_{\partial \mathcal{M}} g(\mathbf{x}) \nabla f(\mathbf{x}) \cdot \mathbf{n}(\mathbf{x}) dl

where the last expression in the equation is the boundary term, which we can ignore for closed meshes.

Hat Function

We define a basis of functions ψ1(x),,ψk(x):MR\psi_1(x), \ldots, \psi_k(x): \mathcal{M} \to \mathbb{R}, where each function ψi(x)\psi_i(x) is a "hat" function centered on vertex ii (image of a hat function is shown above, courtsey K. Crane, CMU). Then we can decompose any function f:MRf: \mathcal{M} \to \mathbb{R} into f=i=1kfiψif = \sum_{i=1}^k f_i \psi_i by setting fif_i to be the value of ff at vertex ii. Intuitively, since a discrete function ff is only defined on the vertices, the hat functions ψi\psi_i simply interpolates the value of ff on the faces of the triangle mesh in a linear fashion (known as barycentric interpolation).

Discretization

We can evaluate the dual LΔf\mathcal{L}_{\Delta f} of the Laplacian Δf\Delta f with a test function gg by writing ff and gg in terms of the basis of the hat function

LΔf[g]=ijgifjMΔψiΔψj dA\mathcal{L}_{\Delta f}[g] = \sum_{ij} g_i f_j \int_{\mathcal{M}} \Delta \psi_i \cdot \Delta \psi_j \ dA

Note that, since the gradient of the hat function is constant over a triangle, the dual Laplacian is simply a sum of scalar values (dot products) per face multiplied by the triangle area.

On a triangle with vertex ii and edge eie_i, the gradient Δψi\Delta \psi_i is simply hi/hi2\mathbf{h}_i / ||\mathbf{h}_i||^2 where hi\mathbf{h}_i is the height vector normal to the edge eie_i and pointing at the vertex ii.

When i=ji=j, the integral ΔψiΔψj dA\int \Delta \psi_i \cdot \Delta \psi_j \ dA on the triangle with vertex ii evaluates to Aψi2=A/h2=(cot(α)+cot(β))/2A ||\nabla \psi_i||^2 = A / ||\mathbf{h}||^2 = (\cot(\alpha) + \cot(\beta))/2, where AA is the area of the triangle and α\alpha and β\beta are the two angles opposite to the vertex ii. Then the integral MΔψiΔψi dA\int_{\mathcal{M}} \Delta \psi_i \cdot \Delta \psi_i \ dA over the entire mesh M\mathcal{M} is simply the sum of the integrals over all neighboring triangles NkN_k of vertex ii:kNi(cotαik+cotβik)/2\sum_{k \in N_i} \left( \cot \alpha_{ik} + \cot \beta_{ik} \right) / 2.

When iji \neq j, the integral ψiψjdA\int \nabla \psi_i \cdot \nabla \psi_j dA on the triangle with vertex ii and jj evaluates to (cotθ)/2-(\cot\theta)/2 where θ\theta is the angle not on either of the two vertices ii and jj. Then the integral MΔψiΔψj dA\int_{\mathcal{M}} \Delta \psi_i \cdot \Delta \psi_j \ dA over the entire mesh M\mathcal{M} is the sum of integrals over all triangles that incident on edge eije_{ij}, namely (cotαij+cotβij)/2(\cot \alpha_{ij} + \cot \beta_{ij}) / 2 where αij\alpha_{ij} and βij\beta_{ij} are the angles not on either of the two vertices ii and jj.

Therefore, if we want to evaluate the Laplacian at vertex ii, we can set the test function to be ψi\psi_i, and evaluate the Laplacian LΔf[ψi]\mathcal{L}_{\Delta f}[\psi_i] to be:

LΔf[ψi]=fiMψiψi dA+kNifkMψiψk dA\mathcal{L}_{\Delta f}[\psi_i] = f_i \int_{\mathcal{M}} \nabla \psi_i \cdot \nabla \psi_i \ dA + \sum_{k \in N_i} f_k \int_{\mathcal{M}} \nabla \psi_i \cdot \nabla \psi_k \ dA

Plugging in the integrals of the hat functions,

LΔf[ψi]=fikNi(cotαik+cotβik)/2kNifk(cotαik+cotβik)/2\mathcal{L}_{\Delta f}[\psi_i] = f_i \sum_{k \in N_i} (\cot \alpha_{ik} + \cot \beta_{ik}) / 2 - \sum_{k \in N_i} f_k (\cot\alpha_{ik} + \cot\beta_{ik}) / 2

We can write this equation in matrix format, LL, where the ijij-th entry is

Lij={kNi(cotαik+cotβik)/2if i=j(cotαij+cotβij)/2if ij are adjacent0otherwiseL_{ij} = \begin{cases} \sum_{k \in N_i} (\cot \alpha_{ik} + \cot \beta_{ik}) / 2 & \text{if } i=j \\ -(\cot\alpha_{ij} + \cot\beta_{ij}) / 2 & \text{if } ij \text{ are adjacent} \\ 0 & \text{otherwise} \end{cases}

LL is known as the discrete cotangent Laplacian matrix.