Smoothing function ported for three.js
Inspired by this website http://www.lighthouse3d.com/opengl/terrain/index.php?smoothing