To understand this question, please first understand the question and answer here: Create a formula that creates a curve between two points
We are essentially transcending a 2d problem into a 3d problem.
I have 4 points arranged as the corners of a 1 unit square on the x-y-plane. Each point also has an arbitrary Z value, a x-gradient, a y-gradient.
To be clear, by "x-gradient" I mean that you draw a tangent line on the X-Z-Plane from the point and get (the change in z) divided by (the change in X).
First describe a surface that exists at those four points and has the correct gradients at those points.
Secondly, create a function that returns the Z value for any two values of X and Y between 0 and 1.