SCDzine
N E W S

Dsgrid interpolates 3D random data

dsgrid plot
Asteroid hits earth?


Contents

Search

Article index

Back issues

Subscribe

Contact us

SCD

by Fred Clare


Dsgrid is a three-dimensional random data interpolator based on a simple inverse distance weighting algorithm. Dsgrid also has an entry for interpolation of two-dimensional random data, but Natgrid will almost always produce superior results in that case.

Dsgrid provides C and Fortran interfaces in both single and double precision. Also, NCAR Command Language (NCL) entries for Dsgrid are among NCL's built-in functions and procedures.

The Dsgrid plot (above, left) illustrates Dsgrid output from interpolation of a function, F(X,Y,Z) = X**2 + Y**2 +Z**2, defined on 2000 random values in a cube bounded by -2 and 2 in each coordinate direction. The plot is an isosurface of the function for an isovalue equal to three and is drawn using Tdpack.

Source code for the example is at:

ngwww.ucar.edu/ngdoc/ng/ngmath/natgrid/plot7.html.


Other features

Dsgrid allows for the selection of the power of the inverse distance used in the weighting, thus controlling the influence of nearby points. By default this power is "3."

A major weakness of Dsgrid is that it is an O(n**2) algorithm and is very slow. There is an option in the package to use only data values within a specified distance for interpolation, and this can speed thing up a bit. Future work on Dsgrid will concentrate on speed improvements.


For more information

Complete documentation for the Dsgrid package is available at:

ngwww.ucar.edu/ngdoc/ng/ngmath/dsgrid/dshome.html


back Back to "Ngmath"

rule
Contents || Search || Article index || Back issues || Subscribe || Contact us || SCD