Index Page
cspice_surfnm
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_SURFNM computes the double precision, outward-pointing
   normal unit 3-vector at a point defined on the surface of an
   ellipsoid.

I/O


   Given:

      a,
      b,      
      c       the values of the ellipsoid's triaxial radii ellipsoid, where:

                 'a' is length in kilometers of the semi-axis of the ellipsoid
                 parallel to the x-axis of the body-fixed reference frame

                 'b' is length in kilometers of the semi-axis of the ellipsoid
                 parallel to the y-axis of the body-fixed reference frame

                 'c' is length in kilometers of the semi-axis of the ellipsoid
                 parallel to the z-axis of the body-fixed reference frame

              [1,1] = size(a); double = class(a)
              [1,1] = size(b); double = class(b)
              [1,1] = size(c); double = class(c)

      point   location(s) on the ellipsoid.

              [3,3]   = size(point); double = class(point)
              
              or     

              [3,3,n] = size(point); double = class(point)

   the call:

      normal = cspice_surfnm( a, b, c, point)

   returns:

      normal   the unit normal(s) to the ellipsoid at 'point' in the direction
               away from the ellipsoid

               If    [3,3]   = size(point)
               then  [3,3]   = size(normal); double = class(normal)

               If    [3,3,n] = size(point)
               then  [3,3,n] = size(normal); double = class(normal)

               'normal' returns with the same vectorization measure, N,
               as 'point'.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      %
      % Define the radii of an ellipsoid.
      %
      a  =  1.;
      b  =  2.;
      c  =  3.;

      %
      % Select a set of locations, three 3-vectors.
      %
      point = [ [ 0.; 0.; 3.], [ 0.; 2.; 0.], [-1; 0; 0] ];

      %
      % Calculate the surface normal to the ellipsoid at 'point'.
      %
      out_norm = cspice_surfnm( a, b, c, point)

   MATLAB outputs:

      out_norm =

           0     0    -1
           0     1     0
           1     0     0

      Three 3-vectors:
         the normal at (0,0,3) equals (0,0,1)
         the normal at (0,2,0) equals (0,0,1)
         the normal at (-1,0,0) equals (-1,0,0)

Particulars


   None.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine surfnm_c.

   MICE.REQ

Version


   -Mice Version 1.0.1, 17-MAR-2015, EDW (JPL)

      Edited I/O section to conform to NAIF standard for Mice documentation.

   -Mice Version 1.0.0, 15-JUN-2006, EDW (JPL)

Index_Entries


   surface normal vector on an ellipsoid


Wed Apr  5 18:00:35 2017