Interpolation on an unstructured (mostly-structured) grid in 4D+

I frequently need to perform interpolations on an unstructured grid. Mostly, with the purpose of filling grid holes and then later continue with regular grid interpolations.

Mathematica V9 and V10 supports linear Interpolation on an unstructured grid up to 3D:

In[4]:= if =
Interpolation[RandomReal[1, {2000, 2}], InterpolationOrder -> 1]; if[.5]

Out[4]= 0.61608

In[5]:= if =
Interpolation[RandomReal[1, {2000, 3}], InterpolationOrder -> 1]; if[.5, .5]

Out[5]= 0.41285

In[6]:= if =
Interpolation[RandomReal[1, {2000, 4}], InterpolationOrder -> 1]; if[.5, .5, .5]

Out[6]= 0.496552


In V8 however, it was possible to apply the same to even higher dimensions. On my present machine I can get up to 5D (higher dimensions apparently require more than the 16GB RAM that I have):

In[2]:= if =
Interpolation[RandomReal[1, {2000, 5}], InterpolationOrder -> 1]; if[.5, .5, .5, .3]

Out[2]= 4.82823

In[3]:= if =
Interpolation[RandomReal[1, {2000, 6}], InterpolationOrder -> 1]; if[.5, .5, .5, .3, .6]

Out[3]= 0.119046


To compensate I used the Imtek Mathematica Supplement. However, this accumulated some incompatibilities with the recent Versions of Mathematica and the performance for higher dimensions is not sufficient for my applications. I am about to switch to Ingolf Dahl's Obtuse package which adds five interpolation methods to the Mathematica Interpolation command. Alternatively, there in this Mathematica Stackexchange post one can find a Radial Basis Function based Interpolation command.

• Another option is using MATLink to call MATLAB. This is practical only if you do not need to make many calls, i.e. if computing the interpolation function value in many points in a single step is acceptable. Otherwise the overhead is too much. And of course you need to have MATLAB. To do simple linear interpolation we need to construct a Delaunay tesselation first. The program qhull can do this. There are a number of posts on this site about how to use qhull from within Mathematica. Are you still interested in this? Commented Feb 12, 2015 at 17:16