1c_natgrids(3NCARG) NCAR GRAPHICS c_natgrids(3NCARG)
2
3
4
6 c_natgrids - primary C entry for natural neighbor gridding
7
9 float *c_natgrids(int, float [], float [], float [],
10 int, int, float [], float [], int *);
11
13 float *c_natgrids (npnts, x, y, z, numxout, numyout, xi, yi, ier);
14
16 npnts The number of input data points. (npnts > 3).
17
18 x An array containing the x coordinates of the input data
19 points.
20
21 y An array containing the y coordinates of the input data
22 points.
23
24 z An array containing the functional values of the input data
25 points. That is, z[m] is the value of the input function at
26 coordinate (x[m],y[m]), for 0 <= m < npnts.
27
28 numxout The number of x values in the output grid.
29
30 numyout The number of y values in the output grid.
31
32 xi An array of dimension numxout containing the x coordinates
33 of the output data grid. The values in xi must be increas‐
34 ing, but need not be equally spaced.
35
36 yi An array of dimension numyout containing the y coordinates
37 of the output data grid. The values in yi must be increas‐
38 ing, but need not be equally spaced.
39
40 ier An error value. If *ier is returned as 0, then no errors
41 were detected. If *ier is non-zero, then refer to the man
42 page for natgrid_errors for details.
43
45 c_natgrids returns a pointer to a linear array of data that is the
46 interpolated grid stored in row-major order. That is, if out is
47 declared as
48
49 float *out;
50
51 and we set:
52
53 out = c_natgrids(numin, x, y, z, numxout, numyout, xo, yo, &ier);
54
55 then out[i*numyout+j] is the interpolated function value at coordinate
56 point (xo[i],yo[j]) for 0 <= i < numxout and 0 <= j < numyout. The
57 space for out is allocated internal to c_natgrids and is numxout*numy‐
58 out floats in size.
59
61 To use c_natgrids, load the NCAR Graphics library ngmath.
62
64 natgrid, natgrid_params, c_nnseti, c_nngeti, c_nnsetr, c_nngetr,
65 c_nnsetc, c_nngetc.
66
67 Complete documentation for Natgrid is available at URL
68 http://ngwww.ucar.edu/ngdoc/ng/ngmath/natgrid/nnhome.html
69
71 Copyright (C) 2000
72 University Corporation for Atmospheric Research
73
74 This documentation is free software; you can redistribute it and/or
75 modify it under the terms of the GNU General Public License as pub‐
76 lished by the Free Software Foundation; either version 2 of the
77 License, or (at your option) any later version.
78
79 This software is distributed in the hope that it will be useful, but
80 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
81 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
82 Public License for more details.
83
84 You should have received a copy of the GNU General Public License along
85 with this software; if not, write to the Free Software Foundation,
86 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
87
88
89
90
91UNIX March 1997-1998 c_natgrids(3NCARG)