Intrinsic/extrinsic embedding for functional remeshing of 3D shapes