I have a set of data on irregular grids. I have perfrom interpolation to find f(x,y). I have implemented bilinear interpolation with the help of algorithm from wikipedia. However, it is not accurate. I would like to implement either Bicubic interpolation or Bicubic spline interpolation. I have found an algorithm for Bicubic interpolation but I have to find the derivatives fx,fy and fxy. It makes my code more complicated. Are there any models already available for Bicubic or Bicubic spline interpolation? If not are there models atleast to calculate fx, fy and fxy? Any kind of solution is very much helpful to me.
According to https://trac.modelica.org/Modelica/ticket/1153#comment:11 it would be very few effort to add bicubic interpolation (on a regular grid) to CombiTable2D of the Modelica Standard Library. This would then be implemented as an external object, e.g. in C.
Check https://github.com/diazona/interp2d/blob/master/bicubic.c for a C implementation of the bicubic interpolation - including the derivatives.