Index Page
cspice_pltnp
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_PLTNP finds the nearest point on a triangular plate to a
   given point.

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

I/O


   Given:

   point      is an arbitrary point in 3-dimensional space.

   v1,
   v2,
   v3         are 3-vectors constituting the vertices of
              a triangular plate.

              The plate is allowed to be degenerate: it may
              consist of a line segment or of a single point.

   the call:

      cspice_pltnp, point, v1, v2, v3, pnear, dist

   returns:

      pnear   is the closest point on the plate to `point'.
              `pnear' is unique, since the plate is convex.

      dist    is the distance between `point' and `pnear'.

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.

   Find the nearest point to the point (2,2,2) on a plate having
   vertices at the unit basis vectors that lie along the positive
   X, Y, and Z coordinate axes.

      PRO PLTNP_T

         point = [2.D, 2.0, 2.0]
         v1    = [1.D, 0.0, 0.0]
         v2    = [0.D, 1.0, 0.0]
         v3    = [0.D, 0.0, 1.0]

         cspice_pltnp, point, v1, v2, v3, pnear, dist


         print, 'Plate vertex 1 = ', v1
         print, 'Plate vertex 2 = ', v2
         print, 'Plate vertex 3 = ', v3
         print, 'Input point    = ', point
         print
         print, 'Near point     = ', pnear
         print, 'Distance       = ', dist

      END

   IDL outputs:

      Plate vertex 1 =        1.0000000       0.0000000       0.0000000
      Plate vertex 2 =        0.0000000       1.0000000       0.0000000
      Plate vertex 3 =        0.0000000       0.0000000       1.0000000
      Input point    =        2.0000000       2.0000000       2.0000000

      Near point     =       0.33333333      0.33333333      0.33333333
      Distance       =        2.8867513

Particulars


   None.

Required Reading


   ICY.REQ
   DSK.REQ

Version


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

Index_Entries


   nearest point on triangular plate



Wed Apr  5 17:58:02 2017