We have a function-like system that produces a output $z$ value for each 2-dimensional $(x,y)$ input. Suppose we have sampled the system using a set of non-uniform $x,y$ inputs (inputs are not in rectangular grids), and then the generated $(x,y) => z$ data is connected into a triangle mesh through some simple approach. How to perform smoothed interpolation on this stuff (given any free $(x,y)$, produce a $z$), like the Lagrange interpolation performed on 1-dimensional $x => y$ data?
And more, how to expand it to a system that has 3D input like $(x,y,z) => w$?
You may apply the same properties that define the Lagrange basis in 1D, namely:
Given a mesh element with $n$ degrees of freedom and a set of basis functions $\{\phi_1,...,\phi_n\}$
For example, consider a 2D triangle with linear elements. You may take an ansatz $\phi_i(x,y) = c_1 + c_2x + c_3y$. Applying the above conditions you can find a basis $\phi_1(x,y) = 1-x-y$, $\phi_2(x,y) = x$, and $\phi_3(x,y) = y$. The same goes for higher order interpolation, you just need an appropriate ansatz.