Implements laplacian smoothing.