DOKK / manpages / debian 12 / libncarg-dev / c_natgrids.3ncarg.en
c_natgrids(3NCARG) NCAR GRAPHICS c_natgrids(3NCARG)

c_natgrids - primary C entry for natural neighbor gridding

float *c_natgrids(int, float [], float [], float [],
int, int, float [], float [], int *);

float *c_natgrids (npnts, x, y, z, numxout, numyout, xi, yi, ier);

The number of input data points. (npnts > 3).
An array containing the x coordinates of the input data points.
An array containing the y coordinates of the input data points.
An array containing the functional values of the input data points. That is, z[m] is the value of the input function at coordinate (x[m],y[m]), for 0 <= m < npnts.
The number of x values in the output grid.
The number of y values in the output grid.
An array of dimension numxout containing the x coordinates of the output data grid. The values in xi must be increasing, but need not be equally spaced.
An array of dimension numyout containing the y coordinates of the output data grid. The values in yi must be increasing, but need not be equally spaced.
An error value. If *ier is returned as 0, then no errors were detected. If *ier is non-zero, then refer to the man page for natgrid_errors for details.

c_natgrids returns a pointer to a linear array of data that is the interpolated grid stored in row-major order. That is, if out is declared as

float *out;

and we set:


out = c_natgrids(numin, x, y, z, numxout, numyout, xo, yo, &ier);

then out[i*numyout+j] is the interpolated function value at coordinate point (xo[i],yo[j]) for 0 <= i < numxout and 0 <= j < numyout. The space for out is allocated internal to c_natgrids and is numxout*numyout floats in size.

To use c_natgrids, load the NCAR Graphics library ngmath.

natgrid, natgrid_params, c_nnseti, c_nngeti, c_nnsetr, c_nngetr, c_nnsetc, c_nngetc.

Complete documentation for Natgrid is available at URL
http://ngwww.ucar.edu/ngdoc/ng/ngmath/natgrid/nnhome.html

Copyright (C) 2000
University Corporation for Atmospheric Research

The use of this Software is governed by a License Agreement.

March 1997-1998 UNIX