void surmatr (x, y, z, npts, xgmin, xgmax, nxpts, ygmin, ygmax, nypts)

void surmatrS (x, y, z, npts, xgmin, xgmax, nxpts, ygmin, ygmax, nypts)

SURMATR.C Level 3
 
float *x, *y, *z The x, y, and z data arrays.
int npts The dimension of the data arrays.
float xgmin The minimum x grid value.
float xgmax The maximum x grid value.
int nxpts The number of x grid intersections.
float ygmin The minimum y grid value.
float ygmax The maximum y grid value.
int nypts The number of y grid intersections.
 
surmatr() produces a 3-D surface from irregularly spaced data points. For best results, there should be a datum point for every 2 to 20 cells. Too many data points confuse the interpolator, and too few result in bad estimates of the grid z values. surmatrS() is the same as surmatr() except that the data points are passed through a 3-D spline smoothing routine, thus yielding a smoother result..

If you get the message "Too few data points," try a coarser grid by reducing nxpts and nypts. If you cannot get satisfactory results that way, try decreasing the precision in R3PLT.C. This can be done by calling settolerance(tolerance). The default value for tolerance is 3.0. The larger the number, the less the precision.