Functions interpolation in 3d space