I have a 2d (u,v) surface in 3d space (x,y,z) that is defined as a b-spline surface. The surface is not arc-length parametrized. Additionally, I have scalar values defined on the surface at given u,v coordinates. I now want to approximate the gradient of the scalar field described by these values at a given u,v position. Therefore I want to fit a plane through the given points by means of a least squares fit. How do I account for the non-uniform parametrization, the scale factors, and the curvature of the surface? Is there a better/another way than assuming a local coordinate system of constant curvature?
PS: Please excuse if the question is not fully clear or stated in the correct mathematical terms, as english is not my native language and I am not trained in maths.