Building interpolating and approximating implicit surfaces using moving least squares