Introduction
In WarpLib, prior to release 3.3.0, there were functions available for interpolation tasks. For example, INTERPOLATE
fills empty time buckets with linear interpolation, and POLYFIT
fits an interpolating polynomial to a series. These interpolations were supported on the time axis, meaning the estimation was based on timestamps.
With the release of Warp 10 version 3.3.0, new WarpScript functions were introduced to calculate multi-dimensional interpolation functions. Unlike previous functions that were timestamp-based, these new functions perform value-to-value interpolations.
New WarpScript Interpolation Functions
The following WarpScript functions have been introduced:
INTERPOLATOR.1D.LINEAR
INTERPOLATOR.1D.SPLINE
INTERPOLATOR.1D.AKIMA
INTERPOLATOR.2D.BICUBIC
INTERPOLATOR.3D.TRICUBIC
INTERPOLATOR.ND.MICROSPHERE
INTERPOLATOR.ND.SMICROSPHERE
These functions return a callable function that estimates the values of points located between the sample points. The resulting function can be called using EVAL
. If it is univariate, it can also be used as a mapper with MAP
. If it is multivariate, it can also be used as a reducer with REDUCE
.
Example Usage 1: 2D Bicubic Interpolation
Here’s an example demonstrating the usage of INTERPOLATOR.2D.BICUBIC
. This function requires the estimates of sample points located on the knots of a 2D grid.
In this snippet, INTERPOLATOR.2D.BICUBIC
takes three arguments. The first two, xval
and yval
, are the coordinates of the control points, and the third argument, fval
, are the values of the function at these points.
That is, the control points and estimates are:
- 10, 10 -> 50
- 10, 50 -> 0
- 10, 180 -> 255
- … etc …
- 190, 180 -> 40
The resulting function interpolatingFunction
can be called to estimate the value of a point within the range of the control points, which is x in (10, 190) and y in (10, 180). Outside of its scope, it will return a NaN value.
Visualizing the Interpolation
To illustrate this function, we can draw the control points:

The red circles are drawn at the coordinates given by xval
and yval
. The grayscale filling the circles is defined by the values of fval
.
Filling the Frame with Estimates
Now, we will fill the frame with estimates:

In this image, the pixels have grayscale estimated values. The red pixels indicate those that are out of the scope of the interpolation function.
Example Usage 2: 3D Tricubic Interpolation
In this second example, we estimate an efficiency measure defined by the values of two pressure sensors and one temperature sensor. We use INTERPOLATOR.3D.TRICUBIC
to create the interpolating function from a 3D grid of sample points.
Now, given sensors producing values in GTS, we can derive the efficiency GTS.

Conclusion
In this blog post, we presented the new multi-dimensional interpolation functions added in WarpLib with the release of Warp 10 version 3.3.0. These functions, prefixed with INTERPOLATOR.*
, enable value-to-value interpolations across multiple dimensions. We demonstrated how these functions work through examples, including estimating values on a 2D grid and a practical use case with 3D sensor data.These new functions make it easier to handle value-to-value interpolation tasks in WarpLib.

Machine Learning Engineer