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_pl2psv

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


Abstract


   CSPICE_PL2PSV returns a point and two orthogonal spanning vectors that
   generate a specified plane.

I/O


   Given:

      plane    a SPICE plane.

               help, plane
                  STRUCT = CSPICE_PLANE

               The structure has the fields:

                  normal:   [3-array double]
                  constant: [scalar double]

   the call:

      cspice_pl2psv, plane, point, span1, span2

   returns:

      point,
      span1,
      span2    respectively, a point and two orthogonal spanning vectors
               that generate the geometric plane represented by `plane'.

               help, point
                  DOUBLE = Array[3]
               help, span1
                  DOUBLE = Array[3]
               help, span2
                  DOUBLE = Array[3]

               The geometric plane is the set of vectors

                  point   +   s * span1   +   t * span2

               where `s' and `t' are real numbers. `point' is the closest
               point in the plane to the origin; this point is always a
               multiple of the plane's normal vector. `span1' and `span2'
               are an orthonormal pair of vectors. `point', `span1', and
               `span2' are mutually orthogonal.

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) Construct a SPICE plane from a normal vector and a point on
      that plane, and calculate a point and two orthogonal spanning
      vectors that generate the specified plane.

      Example code begins here.


      PRO pl2psv_ex1

         ;;
         ;; Define a normal vector from a plane and a
         ;; point in a plane.
         ;;
         normal = [ -1.d,  5.d  , -3.5d ]
         point  = [  9.d, -0.65d, -12.d ]

         ;;
         ;; Create a SPICE plane from the vectors.
         ;;
         cspice_nvp2pl, normal, point, plane
         print, 'Input plane:'
         print, FORMAT='("  Normal vector  :",3F16.11)', $
                                                plane.normal
         print, FORMAT='("  Constant       :",F16.11)',  $
                                                plane.constant
         print, ''

         ;;
         ;; Calculate a point in the plane, and
         ;; two spanning vectors in the plane such that
         ;; the point and spanning are mutually orthogonal.
         ;;
         cspice_pl2psv, plane, point, span1, span2
         print, FORMAT='("Point            :",3F16.11)', point
         print, FORMAT='("Spanning vector 1:",3F16.11)', span1
         print, FORMAT='("Spanning vector 2:",3F16.11)', span2

         ;;
         ;; Test point, span1, and span2 orthogonality. The dot
         ;; products of any two vectors should equal zero to
         ;; within round-off.
         ;;
         print, FORMAT='("dot(point,span1) :", F20.17)', $
                                cspice_vdot( point, span1)
         print, FORMAT='("dot(point,span2) :", F20.17)', $
                                cspice_vdot( point, span2)
         print, FORMAT='("dot(span1,span2) :", F20.17)', $
                                cspice_vdot( span1, span2)

      END


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


      Input plane:
        Normal vector  :  -0.16169041669   0.80845208345  -0.56591645842
        Constant       :   4.81028989655

      Point            :  -0.77777777778   3.88888888889  -2.72222222222
      Spanning vector 1:   0.00000000000   0.57346234436   0.81923192052
      Spanning vector 2:   0.98684153193   0.13246195060  -0.09272336542
      dot(point,span1) : 0.00000000000000000
      dot(point,span2) : 0.00000000000000006
      dot(span1,span2) : 0.00000000000000000


Particulars


   Icy geometry routines that deal with planes use the `plane'
   data type to represent input and output planes. This data type
   makes the routine interfaces simpler and more uniform.

   The Icy routines that produce SPICE planes from data that
   define a plane are:

      cspice_nvc2pl ( Normal vector and constant to plane )
      cspice_nvp2pl ( Normal vector and point to plane    )
      cspice_psv2pl ( Point and spanning vectors to plane )

   The Icy routines that convert SPICE planes to data that
   define a plane are:

      cspice_pl2nvc ( Plane to normal vector and constant )
      cspice_pl2nvp ( Plane to normal vector and point    )
      cspice_pl2psv ( Plane to point and spanning vectors )

Exceptions


   1)  The input plane MUST have been created by one of the Icy
       routines

          cspice_nvc2pl ( Normal vector and constant to plane )
          cspice_nvp2pl ( Normal vector and point to plane    )
          cspice_psv2pl ( Point and spanning vectors to plane )

       Otherwise, the results of this routine are unpredictable.

   2)  If the input argument `plane' is undefined, an error is
       signaled by the IDL error handling system.

   3)  If the input argument `plane' 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, `point', `span1' or `span2',
       is not a named variable, an error is signaled by the Icy
       interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   PLANES.REQ

Literature_References


   [1]  G. Thomas and R. Finney, "Calculus and Analytic Geometry,"
        7th Edition, Addison Wesley, 1988.

Author_and_Institution


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

Version


   -Icy Version 1.0.2, 24-AUG-2021 (JDR)

       Edited the header to comply with NAIF standard. Added 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, 16-AUG-2010 (EDW)

       Expanded and improved -I/O and -Particulars sections.

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

Index_Entries


   plane to point and spanning vectors



Fri Dec 31 18:43:06 2021