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.

I/O


   Given:

      vin     the vector to orthogonally project onto a specified plane.

              [3,1] = size(vin); double = class(vin)

      plane   a structure describing a SPICE plane onto which to
              project 'vin'.

              [1,1] = size(plane); struct = class(plane)

              The structure has the fields:

                 normal:     [3,1] = size(normal); double = class(normal)
                 constant:   [1,1] = size(constant); double = class(constant)

   the call:

      vout = cspice_vprjp( vin, plane )

   returns:

      vout   the vector resulting from the orthogonal projection of 'vin'
             onto 'plane'. 'vout' is the closest point in the specified
             plane to 'vin'.

             [3,1] = size(vout); double = class(vout)

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., 7., 2.2]';

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

      %
      % Create the plane structure.
      %
      ring_plane = cspice_nvp2pl( norm, orig );

      %
      % Project the position vector onto the ring plane...
      %
      proj = cspice_vprjp( vec1, ring_plane )

   MATLAB outputs:

      proj =

          -5
           7
           0

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


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

   MICE.REQ

Version


   -Mice Version 1.0.1, 18-DEC-2014, EDW (JPL)

      Edited I/O section to conform to NAIF standard for Mice documentation.

   -Mice Version 1.0.0, 27-AUG-2012, EDW (JPL)

Index_Entries


   vector projection onto plane


Wed Apr  5 18:00:36 2017