I have a dataset of 3D points and normals. It is generated from fitting a polynomial function z=poly(x,y) on an evenly spaces grid in x-y. The shape of this dataset is convex and very smooth. It resembles a small patch of the upper half of an ellipsoid or cone (“pointing” to the y-axis direction), with small local variations.

I want to calculate a UV map with the smallest distortion in areas (for texturing).

In addition, I need to keep the x-y scale constant. There is no need for any boundary constraints.

*Mathematically speaking*, how should I approach it? Is there a way to use the fact that it is very smooth, convex, and set on an evenly spaced x-y grid for UV mapping?

Practically speaking the data is represented by a NumPy array size (n, m, 3) with equal spacing in x, y and another boolean (n, m) array as a mask for the shape.