Index Page
cspice_cgv2el
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_CGV2EL creates a CSPICE_ELLIPSE structure from a
   center 3-vector and two generating 3-vectors.

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

I/O


   Given:

      center   a double precision 3-vector defining the location for
               an ellipse center

      vec1 &
      vec2     two double precision 3-vectors  defining the ellipse
               (the generating vectors) with the 'center' in
               three-dimensional space. The ellipse is the set of points

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

               where theta ranges over the interval (-pi, pi].

               vec1 and vec2 need not be linearly independent.

   the call:

      cspice_cgv2el, center, vec1, vec2, ellipse

   returns:

      ellipse   a structure describing a SPICE ellipse defined by the input
                vectors. The structure has the fields:

                   center:    dblarr(3)
                   semimajor: dblarr(3)
                   semiminor: dblarr(3)

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 center and two linearly independent
      ;; generating vectors of an ellipse (the vectors need not
      ;; be linearly independent).
      ;;
      center = [ -1.d,  1.d, -1.d ]
      vec1   = [  1.d,  1.d,  1.d ]
      vec2   = [  1.d, -1.d,  1.d ]

      ;;
      ;; Create the CSPICE_ELLIPSE structure.
      ;;
      cspice_cgv2el, center, vec1, vec2, ellipse
      print, ellipse.semiminor
      print, ellipse.semimajor
      print, ellipse.center

   IDL outputs for ellipse.semiminor:

      2.3799435e-16       1.4142136   2.3799435e-16

   IDL outputs for ellipse.semimajor:

          1.4142136  -1.7634653e-16       1.4142136

   IDL outputs for ellipse.center:

         -1.0000000       1.0000000      -1.0000000

   The call has the same effect as:

      cspice_saelgv, vec1, vec2, smajor, sminor

      struct = {CSPICE_ELLIPSE, center:dblarr(3),   $
                                semiMajor:dblarr(3),$
                                semiMinor:dblarr(3) }

      ellipse = {CSPICE_ELLIPSE}

      ellipse.center    = center
      ellipse.semimajor = smajor
      ellipse.semiminor = sminor

Particulars


   None.

Required Reading


   ICY.REQ
   ELLIPSES.REQ

Version


   -Icy Version 1.0.2, 07-FEB-2012, EDW (JPL)

      Clarified description of 'ellipse' output argument. A 'SPICE ellipse'
      not an 'Icy ellipse'.

   -Icy Version 1.0.1, 07-MAY-2008, EDW (JPL)

      Expanded description of input and output variables.

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

Index_Entries


   center and generating vectors to ellipse




Wed Apr  5 17:57:59 2017