Skip to main content

laplacian_smoothing

Function laplacian_smoothing 

Source
pub fn laplacian_smoothing(
    vertices: &[[f64; 3]],
    triangles: &[[usize; 3]],
    iterations: usize,
    lambda: f64,
    keep_boundary: bool,
) -> Vec<[f64; 3]>
Expand description

Laplacian (umbrella) smoothing: each vertex moves a fraction lambda towards the mean of its neighbours, iterations times. Boundary vertices stay put with keep_boundary. Simple but it shrinks closed surfaces; see taubin_smoothing.