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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_SAELGV calculates the semi-axis vectors of an ellipse
   generated by two arbitrary 3-vectors.

I/O


   Given:

      vec1,
      vec2     two vectors that define an ellipse.

               help, vec1
                  DOUBLE = Array[3]
               help, vec2
                  DOUBLE = Array[3]

               The ellipse is the set of points in 3-space

                  center  +  cos(theta) vec1  +  sin(theta) vec2

               where theta is in the interval ( -pi, pi ] and `center' is an
               arbitrary point at which the ellipse is centered. An ellipse's
               semi-axes are independent of its center, so the vector `center'
               shown above is not an input to this routine.

               `vec2' and `vec1' need not be linearly independent;
               degenerate input ellipses are allowed.

   the call:

      cspice_saelgv, vec1, vec2, smajor, sminor

   returns:

      smajor,
      sminor   semi-major and semi-minor axes of the ellipse, respectively.

               help, smajor
                  DOUBLE = Array[3]
               help, sminor
                  DOUBLE = Array[3]

Parameters


   None.

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.

   1) Define two arbitrary, linearly independent, vectors and
      calculate the semi-major and semi-minor axes of the elipse
      generated by them.

      Example code begins here.


      PRO saelgv_ex1

         ;;
         ;; Define two arbitrary, linearly independent, vectors.
         ;;
         vec1 = [ 1.d, 1.d, 1.d ]
         vec2 = [ 1.d,-1.d, 1.d ]

         ;;
         ;; Calculate the semi-major and semi-minor axes of an
         ;; ellipse generated by the two vector.
         ;;
         cspice_saelgv, vec1, vec2, smajor, sminor
         print, FORMAT='("Semi-major axis:",3F12.8)', smajor
         print, FORMAT='("Semi-minor axis:",3F12.8)', sminor

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      Semi-major axis:  1.41421356 -0.00000000  1.41421356
      Semi-minor axis:  0.00000000  1.41421356  0.00000000


Particulars


   We note here that two linearly independent but not necessarily
   orthogonal vectors vec1 and vec2 can define an ellipse
   centered at the origin: the ellipse is the set of points in
   3-space

      center  +  cos(theta) vec1  +  sin(theta) vec2

   where theta is in the interval (-pi, pi] and center is an
   arbitrary point at which the ellipse is centered.

   This routine finds vectors that constitute semi-axes of an
   ellipse that is defined, except for the location of its center,
   by vec1 and vec2. The semi-major axis is a vector of largest
   possible magnitude in the set

      cos(theta) vec1  +  sin(theta) vec2

   There are two such vectors; they are additive inverses of each
   other. The semi-minor axis is an analogous vector of smallest
   possible magnitude. The semi-major and semi-minor axes are
   orthogonal to each other. If smajor and sminor are choices of
   semi-major and semi-minor axes, then the input ellipse can also
   be represented as the set of points

      center  +  cos(theta) smajor  +  sin(theta) sminor

   where theta is in the interval (-pi, pi].

   The capability of finding the axes of an ellipse is useful in
   finding the image of an ellipse under a linear transformation.
   Finding this image is useful for determining the orthogonal and
   gnomonic projections of an ellipse, and also for finding the limb
   and terminator of an ellipsoidal body.

Exceptions


   1)  If one or more semi-axes of the ellipse is found to be the
       zero vector, the input ellipse is degenerate. This case is
       not treated as an error; the calling program must determine
       whether the semi-axes are suitable for the program's intended
       use.

   2)  If any of the input arguments, `vec1' or `vec2', is undefined,
       an error is signaled by the IDL error handling system.

   3)  If any of the input arguments, `vec1' or `vec2', is not of the
       expected type, or it does not have the expected dimensions and
       size, an error is signaled by the Icy interface.

   4)  If any of the output arguments, `smajor' or `sminor', is not a
       named variable, an error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   ELLIPSES.REQ

Literature_References


   [1]  T. Apostol, "Calculus, Vol. II," chapter 5, "Eigenvalues of
        Operators Acting on Euclidean Spaces," John Wiley & Sons,
        1969.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.2, 01-JUN-2021 (JDR)

       Edited the header to comply with NAIF standard. Adde example's
       problem statement and reformatted example's output.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.1, 08-MAY-2008 (EDW)

       Expanded description of input and output variables.

   -Icy Version 1.0.0, 16-JUN-2003 (EDW)

Index_Entries


   semi-axes of ellipse from generating vectors



Fri Dec 31 18:43:07 2021