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_edpnt

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


Abstract


   CSPICE_EDPNT scales a point so that it lies on the surface of a specified
   triaxial ellipsoid that is centered at the origin and aligned
   with the Cartesian coordinate axes.

I/O


   Given:

      p        a non-zero point in three-dimensional space.

               help, p
                  DOUBLE = Array[3]

      a,
      b,
      c        are, respectively, the semi-axis lengths of a triaxial ellipsoid
               in the X, Y, and Z directions.

               help, a
                  DOUBLE = Scalar
               help, b
                  DOUBLE = Scalar
               help, c
                  DOUBLE = Scalar

               The axes of the ellipsoid are aligned with the axes of the
               Cartesian coordinate system.

   the call:

      cspice_edpnt, p, a, b, c, ep

   returns:

      ep       the result of scaling the input point `p' so that it lies on the
               surface of the triaxial ellipsoid defined by the input semi-axis
               lengths.

               help, ep
                  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) Find the surface intercept point on an ellipsoid having radii

          ( 3, 2, 1 )

      of the ray emanating from the origin and having direction
      vector

          ( 1, 1, 1 )


      Example code begins here.


      PRO edpnt_ex1

         a = 3.0
         b = 2.0
         c = 1.0

         cspice_vpack, 1.0, 1.0, 1.0, v

         cspice_edpnt, v, a, b, c, ep

         print, format='(A,3F18.14)', 'EP    = ', ep[0], ep[1], ep[2]

         ;;
         ;; Verify that `ep' is on the ellipsoid.
         ;;
         level =   (ep[0]/a) ^ 2 + (ep[1]/b) ^ 2 + (ep[2]/c) ^ 2

         print, format='(A,F18.14)', 'LEVEL = ', level

      END


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


      EP    =   0.85714285714286  0.85714285714286  0.85714285714286
      LEVEL =   1.00000000000000


Particulars


   This routine efficiently computes the ellipsoid surface point
   corresponding to a specified ray emanating from the origin.
   Practical examples of this computation occur in the Icy
   routines cspice_latsrf and cspice_srfrec.

Exceptions


   1)  If any of the target ellipsoid's semi-axis lengths is
       non-positive, the error SPICE(INVALIDAXES) is signaled by a
       routine in the call tree of this routine.

   2)  If `p' is the zero vector, the error SPICE(ZEROVECTOR) is
       signaled by a routine in the call tree of this routine.

   3)  If the level surface parameter of the input point underflows,
       the error SPICE(POINTTOOSMALL) is signaled by a routine in the
       call tree of this routine.

   4)  If any of the input arguments, `p', `a', `b' or `c', is
       undefined, an error is signaled by the IDL error handling
       system.

   5)  If any of the input arguments, `p', `a', `b' or `c', is not of
       the expected type, or it does not have the expected dimensions
       and size, an error is signaled by the Icy interface.

   6)  If the output argument `ep' is not a named variable, an error
       is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)

Version


   -Icy Version 1.0.0, 09-AUG-2021 (JDR)

Index_Entries


   scale point to lie on ellipsoid



Fri Dec 31 18:43:03 2021