vprjp_c

Index Page vprjp_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void vprjp_c ( ConstSpiceDouble    vin   [3],
                      ConstSpicePlane   * plane,
                      SpiceDouble         vout  [3] )
#### Abstract
       Project a vector onto a specified plane, orthogonally.
#### Required_Reading
       PLANES
#### Keywords
       GEOMETRY
       MATH
       PLANE
       VECTOR
#### Brief_I/O
       Variable  I/O  Description
       --------  ---  --------------------------------------------------
       vin        I   Vector to be projected.
       plane      I   A CSPICE plane onto which vin is projected.
       vout       O   Vector resulting from projection.
#### Detailed_Input
       vin            is a 3-vector that is to be orthogonally projected
                      onto a specified plane.

       plane          is a CSPICE plane that represents the geometric
                      plane onto which vin is to be projected.
#### Detailed_Output
       vout           is the vector resulting from the orthogonal
                      projection of vin onto plane.  vout is the closest
                      point in the specified plane to vin.
#### Parameters
       None.
#### Exceptions
       1)  Invalid input planes are diagnosed by the routine pl2nvc_c,
           which is called by this routine.
#### Files
       None.
#### 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 vprjpi_c, which inverts an orthogonal
       projection of a vector onto a plane, and vproj_c, which projects
       a vector orthogonally onto another vector.
#### Examples
       1)   Find the closest point in the ring plane of a planet to a
            spacecraft located at positn (in body-fixed coordinates).
            Suppose the vector normal is normal to the ring plane, and
            that origin, which represents the body center, is in the
            ring plane.  Then we can make a `plane' with the code

               pnv2pl_c ( origin, normal, &plane );

            can find the projection by making the call

               vprjp_c ( positn, &plane, proj );
#### Restrictions
       None.
#### Literature_References
       [1] `Calculus and Analytic Geometry', Thomas and Finney.
#### Author_and_Institution
       N.J. Bachman   (JPL)
#### Version
       -CSPICE Version 1.0.0, 05-MAR-1999 (NJB)
#### Index_Entries
       vector projection onto plane
#### Link to routine vprjp_c source file vprjp_c.c

    Thu Apr 16 08:59:33 2009