Index Page surfnm_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void surfnm_c ( SpiceDouble        a,
                       SpiceDouble        b,
                       SpiceDouble        c,
                       ConstSpiceDouble   point[3],
                       SpiceDouble        normal[3] )
#### Abstract
       This routine computes the outward-pointing, unit normal vector
       from a point on the surface of an ellipsoid.
#### Required_Reading
       None.
#### Keywords
       ELLIPSOID,  GEOMETRY
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       a          I   Length of the ellisoid semi-axis along the x-axis.
       b          I   Length of the ellisoid semi-axis along the y-axis.
       c          I   Length of the ellisoid semi-axis along the z-axis.
       point      I   Body-fixed coordinates of a point on the ellipsoid
       normal     O   Outward pointing unit normal to ellipsoid at point
#### Detailed_Input
       a          This is the length of the semi-axis of the ellipsoid
                  that is parallel to the x-axis of the body-fixed
                  coordinate system.

       b          This is the length of the semi-axis of the ellipsoid
                  that is parallel to the y-axis of the body-fixed
                  coordinate system.

       c          This is the length of the semi-axis of the ellipsoid
                  that is parallel to the z-axis of the body-fixed
                  coordinate system.

       point      This is a 3-vector giving the bodyfixed coordinates
                  of a point on the ellipsoid. In bodyfixed coordinates,
                  the semi-axes of the ellipsoid are aligned with the
                  x, y, and z-axes of the coordinate system.
#### Detailed_Output
       normal    A unit vector pointing away from the ellipsoid and
                 normal to the ellipsoid at point.
#### Parameters
       None.
#### Exceptions
       1) If any of the axes are non-positive, the error
          SPICE(BADAXISLENGTH) will be signalled.
#### Files
       None.
#### Particulars
       This routine computes the outward pointing unit normal vector to
       the ellipsoid having semi-axes of length a, b, and c from the
       point point.
#### Examples
       A typical use of surfnm_c would be to find the angle of incidence
       of the light from the sun at a point on the surface of an
       ellipsoid.

       Let q be a 3-vector representing the rectangular body-fixed
       coordinates of a point on the ellipsoid (we are assuming that
       the axes of the ellipsoid are aligned with the axes of the
       body fixed frame.)  Let v be the vector from q to the sun in
       bodyfixed coordinates.  Then the following code fragment could
       be used to compute angle of incidence of sunlight at q.

          surfnm_c   ( a, b, c, q, nrml );

          incidn = vsep_c ( v, nrml );
#### Restrictions
       It is assumed that the input point is indeed on the ellipsoid.
       No checking for this is done.
#### Literature_References
       None.
#### Author_and_Institution
       W.L. Taber      (JPL)
       N.J. Bachman    (JPL)
       B.V. Semenov    (JPL)
#### Version
       -CSPICE Version 1.3.1, 31-JAN-2008 (BVS)

          Removed '-Revisions' from the header.

       -CSPICE Version 1.3.0, 22-OCT-1998 (NJB)

          Made input vector const.

       -CSPICE Version 1.2.0, 08-FEB-1998 (NJB)

          Removed local variables used for temporary capture of outputs.

       -CSPICE Version 1.0.0, 25-OCT-1997 (NJB)

           Based on SPICELIB Version 1.2.0, 07-AUG-1996 (WLT)
#### Index_Entries
       surface normal vector on an ellipsoid
#### Link to routine surfnm_c source file surfnm_c.c

    Wed Jun  9 13:05:31 2010