Using the discrete Laplacian operator, we can push each vertex to the average position of its neighbors to smooth the mesh. This technique is known as the mean curvature flow. More formally, for each dimension d, we seek to find a solution fd:MโR that satisfies the mean curvature flow, โtโfdโ=ฮfd. Then the final vertex positions f is the concatenation of the solutions in each dimension, f=[fx,fy,fz].
Similar to the way we discretize the Laplacian operator, we can discretize this PDE using the hat functions ฯiโ as the basis. For example, to solve for f at vertex vjโ, we can integrate the PDE with the test function ฯjโ to obtain,
โiโโtโfiโโโซฯiโโ
ฯjโย dA=โiโfiโโซฮฯiโโ
ฯjโย dA=โโiโfiโโซโฯiโโ
โฯjโย dA
where in the last expression we use integration by parts and ignore the boundary terms.
We define a "mass" matrix D whose entries are the integral: Dijโ=โซฯiโโ
ฯjโย dA. Intuitively, Dijโ decides how much weight we give for the edge eijโ when solving for f.
As usual, we define the entries of Laplacian L as the integral: Lijโ=โโซโฯiโโ
โฯjโย dA.
Then we can simply the expression a bit:
โiโโtโfiโโDijโ=โiโfiโLijโ
We can discretize the time derivative using an unit time ฮดt to get โtโfiโโ=ฮดtfit+1โโfitโโ. Then we can convert the PDF into an implicit Euler integration scheme:
โiโ(DijโโฮดtLijโ)fit+1โ=โiโDijโft
Writing the above formula in matrix notation,
(DโฮดtL)ft+1=Dft
Note that this expression is a sparse linear system that can be efficiently solved using iterative numerical solvers such as conjugate gradient.