c_shgetnp(3NCARG) | NCAR GRAPHICS | c_shgetnp(3NCARG) |
c_shgetnp - find the nearest points to a specified point in 3-space
int c_shgetnp(float, float, float, int, float *, float *, float *,
int, int *);
int c_shgetnp (px, py, pz, n, x[], y[], z[], iflag, ier );
c_shgetnp is called to find the nearest point to a specified point in 3-space. Successive calls to c_shgetnp will determine the point nearest the specified point exclusive of the points found in previous calls, i.e. successive calls can be used to find the N nearest points for any N between one and the maximum number of points in the input dataset.
c_shgetnp returns an integer, say np, such that (x[np],y[np],z[np]) is the nearest input data point to P. np = -1 if *ier is not zero. On successive calls to this function after the first (that is when iflag=1) you can find the Mth closest point to (px,py,pz) with the Mth call.
To use c_shgetnp, load the NCAR Graphics library ngmath.
shgetnp, c_shgrid, c_shseti, c_shgeti, shgrid_params.
Complete documentation for Sh is available at URL
http://ngwww.ucar.edu/ngdoc/ng/ngmath/shgrid/shhome.html
Copyright (C) 2000
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
January 1999 | UNIX |