Returns agridded, 1D array containing y values, given random x,y coordinates (this function works best with sparse data points).
grid_x The size of the vector to return.
w = 1.0 / (dist ^ Order)
dist
is the distance to the point. (Default: 2)XMax The x-coordinate of the right edge of the grid. If omitted, maps the maximum x value found in the points(0, *) array to the right edge of the grid.
XMin The x-coordinate of the left edge of the grid. If omitted, maps the minimum x value found in the points(0, *) array to the left edge of the grid.
GRID_2D is similar to FAST_GRID2. GRID_2D, however, works best with sparse data points (say, less than 1000 points to be gridded) and is stable when extrapolating into large void areas. (FAST_GRID2 works best with dense data points; it is considerably faster, but slightly less accurate, than GRID_2D.)
PRO grid_demo2
points = INTARR(2, 10) points(*, 0) = [1,2] points(*, 1) = [1,3] points(*, 2) = [9,5] points(*, 3) = [8,0] points(*, 4) = [9,6] points(*, 5) = [9,9] points(*, 6) = [7,15] points(*, 7) = [6,-5] points(*, 8) = [0,3] points(*, 9) = [0,-1]
WINDOW, 0, Colors=128 LOADCT, 4 T3D, /Reset
!Y.Range = [MIN(points), MAX(points)]
yval = GRID_2D(points, 256, Order=0.5) PLOT, yval, Color=60 yval = GRID_2D(points, 256, Order=1.0) OPLOT, yval, Color=80 yval = GRID_2D(points, 256, Order=2.0) OPLOT, yval, Color=100 yval = GRID_2D(points, 256, Order=3.0) OPLOT, yval, Color=120
!Y.Range = [0.0, 0.0]
END
UNIX and OpenVMS Users: For information on the optional software package for advanced gridding, PV-WAVE:GTGRID, contact your Visual Numerics account representative.