Requires a grid of uniformly sampled data points.