Index Page
cspice_pltvol
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_PLTVOL computes the volume of a three-dimensional region bounded by
   a collection of triangular plates.

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

I/O


   Given:

      vrtces   is an array containing the plate model's vertices.

               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 nv, where
               nv is the number of vertices comprising the plate model.

               This routine doesn't associate units with the
               vertices.

      plates   is an array containing 3-tuples of integers
               representing the model's plates. The elements of
               `plates' are vertex indices. The vertex indices are
               1-based: vertices have indices ranging from 1 to
               nv, where nv is the number of vertices comprising the
               plate model.

               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:

      pltvol = cspice_pltvol( vrtces, plates )

   returns:

      pltvol   The function returns the volume of the spatial region bounded
               by the plates.

               If the components of the vertex array have distance unit L,
               then the output volume has units

                3
               L

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.

   Compute the volume 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 )

      PRO PLTVOL_T

         ;;
         ;; 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 ]  ]

         vol = cspice_pltvol( vrtces, plates );

         print, 'Expected volume =      1/6'
         print, 'Computed volume =     ', vol

      END

   IDL outputs:

      Expected volume =      1/6
      Computed volume =           0.16666667

Particulars


   This routine computes the volume of a spatial region bounded by
   a set of triangular plates. If the plate set does not actually
   form the boundary of a spatial region, the result of this routine
   is invalid.

   Examples:

      Valid inputs
      ------------
      Tetrahedron
      Box
      Tiled ellipsoid
      Two disjoint boxes

      Invalid inputs
      --------------
      Single plate
      Tiled ellipsoid with one plate removed
      Two boxes with intersection having positive volume

Required Reading


   ICY.REQ
   DSK.REQ

Version


   -Icy Version 1.0.0, 15-DEC-2016, ML (JPL), EDW (JPL)

Index_Entries


   compute plate model volume



Wed Apr  5 17:58:02 2017