TRILINTERP - linear interpolation of the 3D function