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

NGGSOG - Returns the latitudes and longitudes of six points defining a five-pointed star at a given point

Access

       To  use NGGSOG or c_nggsog, 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_nggsog(float slat, float slon, float srad, float *alat,
       float *alon)

Description

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

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

       SRAD        (an  input expression of type REAL) specifies the great-circle distance, in degrees, from the
                   center of the star to the end of one of its points.

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

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

Examples

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

Messages

       None.

Name

       NGGSOG - Returns the latitudes and longitudes of six points defining a five-pointed star at a given point
       on the surface of the globe.

See Also

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

Synopsis

       CALL NGGSOG (SLAT,SLON,SRAD,ALAT,ALON)

Usage

       Let C represent (CLAT,CLON), let O represent the center of the globe, and let P represent the end of  one
       point of the star.  Then, the angle POC has the magnitude specified by SRAD.

       SIN,  COS, and TAN are used to generate points representing a star having the desired radius and centered
       at the the point with latitude 0 and longitude 0.  These points are then subjected to two rotations - one
       that brings the star up to the desired latitude, and another that carries it to the desired longitude.

       NGGSOG is intended to be used for relatively small stars marking points of interest on the surface of the
       globe; using SRAD = 90 degrees is  guaranteed  to  get  you  into  trouble  and  SRAD  <  10  degrees  is
       recommended.

See Also