int InterpolateZ(x_in, y_in, z_in, npts, xmin, xmax, nxg, ymin, ymax,
         nyg, z_out)
R3PLT.C Level 3
 
float *x_in, *y_in, *z_in The input arrays of randomly spaced points.
int npts The number of random points.
float xmin The minimum x value to be used in the resultant grid.
float xmax The maximum x value to be used in the resultant grid.
int nxg The number of x grid divisions in the resultant grid.
float ymin The minimum y value to be used in the resultant grid.
float ymax The maximum y value to be used in the resultant grid.
int nyg The number of y grid divisions in the resultant grid.
float **z_out The resulting matrix of z values. The z_out array must be allocated using the dim2() memory allocation function. The syntax for the dim2() call is 
z_out = (float **)dim2(nyg, nxg, sizeof(float)).
 
InterpolateZ() takes arrays of randomly spaced z(x, y) points and fills out a grid of nx ´ ny points with interpolated z values. The resulting matrix may be post-processed to exclude regions by inserting NANs, or may be smoothed using the spline3() function. The second plot of the example program R3TEST.C illustrates the use of this function.