title: Interpolate 3d surface ilnumerics
body: <p>I'd like to interpolate a surface using c#. The situation is the following:</p>
  
  <p>A set of x,y,z coordinates is given.
  Now I d like to interpolate between those points using a finer grid.
  Actually I d like to know the z coordinate at a certain point, e.g. x=2.2, y=1.6 z =??.</p>
  
  <p>I was able to solve the interpolation using MatLab, but was not successful while using c#..
  Furthermore, I was able to plot surfaces with ilnumerics, and tried to find some information on their homepage.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I think I need to clarify some things - sorry for the confusing way of asking my question</p>
  
  <p>here you can see how I draw the surface out of some points:</p>
  
  <pre><code>using System;
  using System.Drawing;
  using System.Windows.Forms;
  using ILNumerics;
  using ILNumerics.Drawing;
  using ILNumerics.Drawing.Plotting; 
  
  namespace Surface
  {
     public partial class Form1 : Form
     {
        public Form1()
        {
           InitializeComponent();
        }
  
        private void ilPanel1_Load(object sender, EventArgs e)
        {
           using (ILScope.Enter())
           {
              ILArray&lt;float&gt;  R = ILMath.linspace&lt;float&gt;(0, 5, 5);
              ILArray&lt;float&gt; R1 = ILMath.linspace&lt;float&gt;(0, 25, 5);
              ILArray&lt;float&gt;  y = 1;
              ILArray&lt;float&gt;  x = ILMath.meshgrid(R, R, y);
              ILArray&lt;float&gt; z = ILMath.meshgrid(R * R, R, y);
              ILArray&lt;float&gt; Z = ILMath.zeros&lt;float&gt;(x.S[0], x.S[1], 3);
  
              Z[":;:;1"] = x;
              Z[":;:;2"] = y;
              Z[":;:;0"] = z;
  
               ilPanel1.Scene.Add(new ILPlotCube(twoDMode: false) {
                  new ILSurface(Z, colormap: Colormaps.Cool) {
                      Colors = 1.4f * x * x * x + 0.13f * y * y,
                      Childs = { new ILColorbar() }
                  }
              });
           }
        }
     }
  }
  </code></pre>
  
  <p>The x and y coordinates are linearly distributed from 0 to 5 and the z coordinate has an quadratic shape. I d like to now the value of the z coordinate at a certain x,y coordinate, e.g. x=2.2, y=1.6 z =?? - which is definitely not a know point on my surface. So I thought it would be a good idea to interpolate the surface with an "finer" grid, that I m able to read out the value of the z coordinate...</p>