title: Best algorithm to interpolate on a grid
body: <p>I have a set points whose coordinates are given by the arrays <code>x</code>, <code>y</code> and <code>z</code> and the value of the density field in each point is stored in the array <code>d</code>.
  I would like to reconstruct the density field on a uniform grid. What's the best algorithm to do that?
  I know that in python, the scipy module come in handy with the <code>griddata</code> function but I would like to write my own code, I just need a hint.</p>