I would have a look at: How to compute tangent vectors on facets (2D surface parametrization) - #3 by hherlyng
by @hherlyng, which i believe can be adapted to manifolds by using the CellNormal
instead of facetnormal, and the dx
measure instead of dS
/ds
.