logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

NGGCOG - Returns the latitudes and longitudes of a set of points approximating a circle at a given point

Access

       To use NGGCOG or c_nggcog, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably  in
       that order.

C-Binding Description

       The C binding argument descriptions are the same as the FORTRAN argument descriptions.

C-Binding Synopsis

       #include <ncarg/ncargC.h>

       void c_nggcog(float clat, float clon, float crad, float *alat,
       float *alon, int npts)

Description

       CLAT        (an  input  expression  of  type  REAL)  is the latitude, in degrees, of a point on the globe
                   defining the center of the circle.

       CLON        (an input expression of type REAL) is the longitude, in degrees, of  a  point  on  the  globe
                   defining the center of the circle.

       CRAD        (an  input  expression  of type REAL) specifies the radius of the circle.  This is given as a
                   great-circle distance, in degrees.

       ALAT        (an output array, of type REAL, dimensioned NPTS) is an  array  in  which  the  latitudes  of
                   points on the circle are to be returned.

       ALON        (an  output  array,  of  type  REAL, dimensioned NPTS) is an array in which the longitudes of
                   points on the circle are to be returned.

       NPTS        (an input expression, of type INTEGER) is  the  desired  number  of  points  to  be  used  to
                   represent the circle.  Its value determines how accurately the circle will be represented.

Examples

       Use the ncargex command to see the following relevant example: cpex10.

Messages

       None.

Name

       NGGCOG - Returns the latitudes and longitudes of a set of points approximating a circle at a given point
       on the surface of the globe.

See Also

       Online: nggsog(3NCARG), ngritd(3NCARG).

Synopsis

       CALL NGGCOG (CLAT,CLON,CRAD,ALAT,ALON,NPTS)

Usage

       Let  C  represent  (CLAT,CLON) and let O represent the center of the globe.  The circle is the set of all
       points P on the globe such that the angle POC is of the size specified by CRAD.

       SIN and COS are used to generate points representing a circle having the desired radius and  centered  at
       the  North  Pole.   These points are then subjected to two rotations - one that brings the circle down to
       the desired latitude, and another that carries it to the desired longitude.

See Also