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
saelgv_c

Table of contents
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

   saelgv_c ( Semi-axes of ellipse from generating vectors ) 

   void saelgv_c ( ConstSpiceDouble   vec1  [3],
                   ConstSpiceDouble   vec2  [3],
                   SpiceDouble        smajor[3],
                   SpiceDouble        sminor[3]  )

Abstract

   Find semi-axis vectors of an ellipse generated by two arbitrary
   three-dimensional vectors.

Required_Reading

   ELLIPSES

Keywords

   ELLIPSE
   GEOMETRY
   MATH


Brief_I/O

   VARIABLE  I/O  DESCRIPTION
   --------  ---  --------------------------------------------------
   vec1,
   vec2       I   Two vectors used to generate an ellipse.
   smajor     O   Semi-major axis of ellipse.
   sminor     O   Semi-minor axis of ellipse.

Detailed_Input

   vec1,
   vec2        are two vectors that define an ellipse.
               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.

Detailed_Output

   smajor,
   sminor      are semi-major and semi-minor axes of the ellipse,
               respectively. `smajor' and `sminor' may overwrite
               either of `vec1' or `vec2'.

Parameters

   None.

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.

Files

   None.

Particulars

   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.

Examples

   1)  An example using inputs that can be readily checked by
       hand calculation.

          Let

             vec1 = ( 1.,  1.,  1. )
             vec2 = ( 1., -1.,  1. )

         The function call

            saelgv_c ( vec1, vec2, smajor, sminor );

         returns

            smajor = ( -1.414213562373095,
                        0.0,
                       -1.414213562373095 )
         and

            sminor = ( -2.4037033579794549D-17
                        1.414213562373095,
                       -2.4037033579794549D-17 )


   2)   This example is taken from the code of the CSPICE routine
        pjelpl_c, which finds the orthogonal projection of an ellipse
        onto a plane. The code listed below is the portion used to
        find the semi-axes of the projected ellipse.


           #include "SpiceUsr.h"
                 .
                 .
                 .

           /.
           Project vectors defining axes of ellipse onto plane.
           ./
           vperp_c ( vec1,   normal,  proj1 );
           vperp_c ( vec2,   normal,  proj2 );

              .
              .
              .

           saelgv_c ( proj1,  proj2,  smajor,  sminor );


        The call to saelgv_c determines the required semi-axes.

Restrictions

   None.

Literature_References

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

Author_and_Institution

   N.J. Bachman        (JPL)
   J. Diaz del Rio     (ODC Space)
   W.L. Taber          (JPL)

Version

   -CSPICE Version 1.0.1, 13-APR-2021 (JDR)

       Edited the header to comply with NAIF standard.

   -CSPICE Version 1.0.0, 12-JUN-1999 (NJB) (WLT)

Index_Entries

   semi-axes of ellipse from generating vectors
Fri Dec 31 18:41:11 2021