Interpolating and approximating implicit surfaces from polygon soup