The GRID3 function fits a smooth function to a set of 3D scattered nodes ( x i , y i , z i ) with associated data values ( f i ). The function can be sampled over a set of user-specified points, or over an arbitrary 3D grid which can then be viewed using the SLICER procedure.
GRID3 uses the method described in Renka, R. J., "Multivariate Interpolation of Large Sets of Scattered Data," ACM Transactions on Mathematical Software , Vol. 14, No. 2, June 1988, Pages 139-148, which has been referred to as the Modified Shepard's Method. The function described by this method has the advantages of being equal to the values of f i , at each ( x i , y i , z i ), and being smooth (having continuous first partial derivatives).
If no optional or keyword parameters are supplied, GRID3 produces a regularly-sampled volume with dimensions of (25, 25, 25), made up of single-precision, floating-point values, enclosing the original data points.
Arrays containing the locations of the data points, and the value of the variable to be interpolated at that point. X , Y , Z , and F must have the same number of elements (with a minimum of 10 elements per array) and are converted to floating-point if necessary.
Optional arrays containing the locations within the volume to be sampled (if the GRID keyword is not set), or the locations along each axis of the sampling grid (if the GRID keyword is set). If these parameters are supplied, the keywords DELTA, NGRID, and START are ignored.
If the keyword GRID is not set, the result has the same number of elements as G x , G y , and G z . The i th element of the result contains the value of the interpolate at ( G xi , G yi , G zi ). The result has the same dimensions as G x .
If the GRID keyword is set, the result of GRID3 is a three-dimensional, single-precision, floating-point array with dimensions of ( N x , N y , N z ), where N x , N y , and N z are the number of elements in G x , G y , and G z , respectively.
The tolerance for detecting an ill-conditioned system of equations. The default value is 0.01, which is appropriate for small ranges of X , Y , and Z . For large ranges of X , Y , or Z , it may be necessary to decrease the value of DTOL. If you receive the error message "GRID3: Ill-conditioned matrix or all nodes co-planar," try decreasing the value of DTOL.
The number of samples along each axis. NGRID can be set to a scalar, in which case each axis has the same number of samples, or to a three-element array containing the number of samples for each axis. The default value for NGRID is 25.