re-sampling a mesh