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

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     SAELGV ( Semi-axes of ellipse from generating vectors )

     SUBROUTINE SAELGV ( VEC1, VEC2, SMAJOR, SMINOR )

Abstract

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

Required_Reading

     ELLIPSES

Keywords

     ELLIPSE
     GEOMETRY
     MATH

Declarations

     IMPLICIT NONE

     DOUBLE PRECISION      VEC1   ( 3 )
     DOUBLE PRECISION      VEC2   ( 3 )
     DOUBLE PRECISION      SMAJOR ( 3 )
     DOUBLE PRECISION      SMINOR ( 3 )

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.

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.D0,  1.D0,  1.D0 )
               VEC2 = ( 1.D0, -1.D0,  1.D0 )

           The subroutine call

              CALL SAELGV ( VEC1, VEC2, SMAJOR, SMINOR )

           returns

              SMAJOR = ( -1.414213562373095D0,
                          0.0D0,
                         -1.414213562373095D0 )
           and

              SMINOR = ( -2.4037033579794549D-17
                          1.414213562373095D0,
                         -2.4037033579794549D-17 )


     2)   This example is taken from the code of the SPICELIB routine
          PJELPL, 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.

             C
             C     Project vectors defining axes of ellipse onto plane.
             C
                   CALL VPERP ( VEC1,   NORMAL,  PROJ1  )
                   CALL VPERP ( VEC2,   NORMAL,  PROJ2  )

                      .
                      .
                      .

                   CALL SAELGV ( PROJ1,  PROJ2,  SMAJOR,  SMINOR )


          The call to SAELGV 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

    SPICELIB Version 1.2.0, 28-MAY-2021 (JDR)

        Added IMPLICIT NONE statement.

        Edited the header to comply with NAIF standard.

    SPICELIB Version 1.1.1, 22-APR-2010 (NJB)

        Header correction: assertions that the output
        can overwrite the input have been removed.

    SPICELIB Version 1.1.0, 02-SEP-2005 (NJB)

        Updated to remove non-standard use of duplicate arguments
        in VSCL calls.

    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)

        Comment section for permuted index source lines was added
        following the header.

    SPICELIB Version 1.0.0, 02-NOV-1990 (NJB) (WLT)
Fri Dec 31 18:36:44 2021