Index Page
cspice_vprjp
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_VPRJP orthogonally projects a vector onto a specified plane.

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

I/O


   Given:

      vin     a double precision 3-vector to orthogonally project onto a
              specified plane.

      plane   a SPICE plane structure that represents the geometric plane
              onto which to project 'vin'. The structure has the ields:

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

   the call:

      cspice_vprjp, vin, plane, vout

   returns:

      vout   a double precision 3-vector resulting from the orthogonal
             projection of 'vin' onto 'plane'. 'vout' is the closest point
             in the specified plane to 'vin'.

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 closest point in the ring plane of a planet to a
      ;; spacecraft located at vec1 (in body-fixed coordinates).
      ;;
      vec1 = [ -5.d, 7.d, 2.2d]

      ;;
      ;; Define the vector normal as the normal to the
      ;; equatorial ring plane, and the origin at body/ring center
      ;;
      norm = [ 0.d, 0.d, 1.d ]
      orig = [ 0.d, 0.d, 0.d ]

      ;;
      ;; Create the plane structure.
      ;;
      cspice_nvp2pl, norm, orig, ring_plane

      ;;
      ;; Project the position vector onto the ring plane...
      ;;
      cspice_vprjp, vec1, ring_plane, proj

   IDL returns proj as:    -5.0000000    7.0000000    0.0000000

Particulars


   Projecting a vector v orthogonally onto a plane can be thought of
   as finding the closest vector in the plane to v.  This `closest
   vector' always exists; it may be coincident with the original
   vector.

   Two related routines are cspice_vprjpi, which inverts an orthogonal
   projection of a vector onto a plane, and cspice_vproj, which projects
   a vector orthogonally onto another vector.

Required Reading


   ICY.REQ
   PLANES.REQ

Version


   -Icy Version 1.0.1, 23-NOV-2010, EDW (JPL)

      Improved the Particulars and I/O sections. The section now meets NAIF
      standard for Icy headers.

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

Index_Entries


   vector projection onto plane




Wed Apr  5 17:58:04 2017