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_pltar

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


Abstract


   CSPICE_PLTAR computes the total area of a collection of triangular plates.

I/O


   Given:

      vrtces   an array containing the plate model's vertices.

               help, vrtces
                  DOUBLE = Array[3,NV]

               Elements

                  vrtces[0,i-1]
                  vrtces[1,i-1]
                  vrtces[2,i-1]

               are, respectively, the X, Y, and Z components of
               the ith vertex, where `i' ranges from 1 to m, the number
               of triangular plates comprising the plate set.

               This routine doesn't associate units with the
               vertices.

      plates   an array containing 3-tuples of integers representing the
               model's plates.

               help, plates
                  LONG = Array[3,NP]

               The elements of `plates' are vertex indices. The vertex indices
               are 1-based: vertices have indices ranging from 1 to n, the
               number of vertices comprising the plate set.

               The elements

                  plates[0,i-1]
                  plates[1,i-1]
                  plates[2,i-1]

               are, respectively, the indices of the vertices
               comprising the ith plate.

               Note that the order of the vertices of a plate is
               significant: the vertices must be ordered in the
               positive (counterclockwise) sense with respect to
               the outward normal direction associated with the
               plate. In other words, if v1, v2, v3 are the
               vertices of a plate, then

                  ( v2 - v1 )  x  ( v3 - v2 )

               points in the outward normal direction. Here
               "x" denotes the vector cross product operator.

   the call:

      pltar = cspice_pltar( vrtces, plates )

   returns:

      pltar    the total area of the input set of plates.

               help, pltar
                  DOUBLE = Scalar

               Each plate contributes the area of the triangle defined by the
               plate's vertices.

               If the components of the vertex array have length unit L, then
               the output area has units

                   2
                  L

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) Compute the area of the pyramid defined by the four
      triangular plates whose vertices are the 3-element
      subsets of the set of vectors:

         ( 0, 0, 0 )
         ( 1, 0, 0 )
         ( 0, 1, 0 )
         ( 0, 0, 1 )


      Example code begins here.


      PRO pltar_ex1

         ;;
         ;; Let the notation
         ;;
         ;;    < A, B >
         ;;
         ;; denote the dot product of vectors A and B.
         ;;
         ;; The plates defined below lie in the following planes,
         ;; respectively:
         ;;
         ;;    Plate 1:    { P :  < P, (-1,  0,  0) > = 0 }
         ;;    Plate 2:    { P :  < P, ( 0, -1,  0) > = 0 }
         ;;    Plate 3:    { P :  < P, ( 0,  0, -1) > = 0 }
         ;;    Plate 4:    { P :  < P, ( 1,  1,  1) > = 1 }
         ;;
         vrtces =[ [ 0.D, 0.0, 0.0 ], $
                   [ 1.D, 0.0, 0.0 ], $
                   [ 0.D, 1.0, 0.0 ], $
                   [ 0.D, 0.0, 1.0 ]  ]

         plates =[ [ 1L, 4, 3 ], $
                   [ 1, 2, 4 ], $
                   [ 1, 3, 2 ], $
                   [ 2, 3, 4 ]  ]

         area = cspice_pltar( vrtces, plates )

         print, 'Expected area  (3 + sqrt(3))/2 = 0.23660254037844384d+01'
         print, 'Computed area  =  ', area

      END


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


      Expected area  (3 + sqrt(3))/2 = 0.23660254037844384d+01
      Computed area  =         2.3660254


Particulars


   This routine computes the total area of a set of triangular
   plates. The plates need not define a closed surface.

   Examples of valid plate sets:

      Tetrahedron
      Box
      Tiled ellipsoid
      Tiled ellipsoid with one plate removed
      Two disjoint boxes
      Two boxes with intersection having positive volume
      Single plate
      Empty plate set

Exceptions


   1)  If the number of plates is less than 0, the error
       SPICE(BADPLATECOUNT) is signaled by a routine in the call tree
       of this routine.

   2)  If the number of plates is positive and the number of vertices
       is less than 3, the error SPICE(TOOFEWVERTICES) is signaled by
       a routine in the call tree of this routine.

   3)  If any plate contains a vertex index outside of the range

          [1, nv]

       where `nv' is the number of vertices, the error
       SPICE(INDEXOUTOFRANGE) is signaled by a routine in the call
       tree of this routine.

   4)  If any of the input arguments, `vrtces' or `plates', is
       undefined, an error is signaled by the IDL error handling
       system.

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

Files


   None.

Restrictions


   None.

Required_Reading


   DSK.REQ
   ICY.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.0.1, 01-JUN-2021 (JDR)

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Edited the header to comply with NAIF standard. Corrected typo in
       code example output.

       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.0, 15-DEC-2016 (ML) (EDW)

Index_Entries


   compute plate model area



Fri Dec 31 18:43:06 2021