1SHGETNP(3NCARG)                  NCAR GRAPHICS                 SHGETNP(3NCARG)
2
3
4

NAME

6       SHGETNP - find the nearest points to a specified point in 3-space.
7

SYNOPSIS

9       CALL SHGETNP (PX, PY, PZ, N, X, Y, Z, IFLAG, IWK, RWK, NP, IER)
10

DESCRIPTION

12       PX          (real,input)  The  X  coordinate  value for a point P whose
13                   nearest neighbor is to be found.
14
15       PY          (real,input) The Y coordinate value for  a  point  P  whose
16                   nearest neighbor is to be found.
17
18       PZ          (real,input)  The  Z  coordinate  value for a point P whose
19                   nearest neighbor is to be found.
20
21       X           (real, input) An array containing the X coordinates of  the
22                   input data points.
23
24       Y           (real,  input) An array containing the Y coordinates of the
25                   input data points.
26
27       Z           (real, input) An array containing the Z coordinates of  the
28                   input data points.
29
30       IFLAG       (integer,  input) A flag that equals 0 if this is the first
31                   call to this subroutine for the given dataset and equals  1
32                   otherwise.
33
34       IRK         (integer,  input)  An  integer workspace dimensioned for at
35                   least 2*N.
36
37       RWK         (real, input) A real workspace  dimensioned  for  at  least
38                   11*N+6.
39
40       NP          (integer, output) An index such that (X(NP),Y(NP),Z(NP)) is
41                   the nearest input data point to P. NP = 0 if IER .NE. 0. On
42                   successive  calls  to this subroutine after the first (that
43                   is when IFLAG=1) you can find  the  Mth  closest  point  to
44                   (PX,PY,PZ)  with  the  Mth  call. IWK and RWK should not be
45                   modified between calls to SHGETNP if  you  are  wanting  to
46                   find successive nearest neighbors.
47
48       IER         (integer,  output)  An  error  return  value.   If  IER  is
49                   returned as 0, then no errors were detected. If IER is non-
50                   zero,  then  refer  to  the  man page for shgrid_errors for
51                   details.
52

USAGE

54       SHGETNP is called to find the nearest point to  a  specified  point  in
55       3-space.   Successive calls to SHGETNP will determine the point nearest
56       the specified point exclusive of the points found  in  previous  calls,
57       i.e.  successive calls can be used to find the N nearest points for any
58       N between one and the maximum number of points in the input dataset.
59

ACCESS

61       To use SHGETNP, load the NCAR Graphics library ngmath.
62

SEE ALSO

64       shgrid, shseti, shgeti, shgrid_params.
65
66       Complete documentation for Shgrid is available at URL
67       http://ngwww.ucar.edu/ngdoc/ng/ngmath/shgrid/shhome.html
68
70       Copyright (C) 1997-2000
71       University Corporation for Atmospheric Research
72
73       The use of this Software is governed by a License Agreement.
74
75
76
77UNIX                            September 1999                 SHGETNP(3NCARG)
Impressum