new routine for smoothing with triangles