Index Page
cspice_vprjpi
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_VPRJPI calculates the vector in a specified plane that
   maps under orthogonal projection to a specified vector in
   another plane.

I/O


   Given:

      vin      an arbitrary 3-vector.

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

      projpl   a SPICE plane that represents the geometric plane containing
               'vin'. The structure has the fields:

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

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

      invpl    a SPICE plane that represents the geometric plane containing
               the inverse image of 'vin' under orthogonal projection onto
               'projpl'. The structure has the fields:

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

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

   the call:

      [vout, found] = cspice_vprjpi( vin, projpl, invpl )

   returns:

      vout     inverse orthogonal projection of 'vin'. This is the vector
               lying in the plane 'invpl' whose orthogonal projection onto the
               plane 'projpl' is 'vin'. 'vout' is valid only when 'found' is
               true. Otherwise, 'vout' is undefined.

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

      found    flag(s) indicating whether the inverse orthogonal projection
               of 'vin' could be computed. 'found' is true if so, 
               false otherwise.

               [1,1] = size(found); logical = class(found)

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.

      %
      % Construct 2 planes via cspice_nvc2pl. Define the normal
      % vectors and constants for the planes.
      %
      norm1 = [ 0, 0, 1]';
      norm2 = [ 1, 0, 1]';
      con1  = 1.2;
      con2  = 0.65;

      %
      % Use the normals and constants to create the plane structures,
      % plane1 and plane2.
      %
      plane1 = cspice_nvc2pl( norm1, con1 );
      plane2 = cspice_nvc2pl( norm2, con2 );

      %
      % Define a vector in plane1...
      %
      vec = [ 1, 1, 0]';

      %
      % Calculate the inverse projection to plane2.
      %
      [ vec_iproj, found] = cspice_vprjpi( vec, plane1, plane2);

      if ( found )
         disp( 'Found inverse vector:' )
         vec_iproj
      else
         disp( 'Could not find the inverse vector.' )
      end

   MATLAB outputs:

      Found inverse vector:

      vec_iproj =

           1.000000000000000e+00
           1.000000000000000e+00
          -3.500000000000000e-01

Particulars


   None.

Required Reading


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

   MICE.REQ

Version


   -Mice Version 1.0.0, 12-MAR-2012, EDW (JPL), SCK (JPL)

Index_Entries


   vector projection onto plane


Wed Apr  5 18:00:36 2017