void vperp_c ( ConstSpiceDouble a[3],
ConstSpiceDouble b[3],
SpiceDouble p[3] )
Find the component of a vector that is perpendicular to a second
vector. All vectors are 3-dimensional.
None.
VECTOR
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
a I The vector whose orthogonal component is sought.
b I The vector used as the orthogonal reference.
p O The component of a orthogonal to b.
a is a double precision, 3-dimensional vector. It the vector
whose component orthogonal to b is sought. (There is a
unique decomposition of a into a sum v + p, where v is
parallel to b and p is orthogonal to b. We want the
component p.)
b is a double precision, 3-dimensional vector. This
vector is the vector used as a reference for the
decomposition of a.
p is a double precision, 3-dimensional vector containing
the component of a that is orthogonal to b.
p may overwrite either a or b.
None.
Error free.
None.
Given and non-zero vector b and a vector a, there is a unique
decomposition of a as a sum v + p such that p is orthogonal
to b and v is parallel to b. This routine finds the vector p.
If b is a zero vector, p will be identical to a.
The following table gives sample inputs and results from calling
vperp_c.
a b p
------------------------------------------
(6, 6, 6) ( 2, 0, 0) (0, 6, 6)
(6, 6, 6) (-3, 0, 0) (0, 6, 6)
(6, 6, 0) ( 0, 7, 0) (6, 0, 0)
(6, 0, 0) ( 0, 0, 9) (6, 0, 0)
None.
REFERENCE: Any reasonable calculus text (for example Thomas)
W.L. Taber (JPL)
-CSPICE Version 1.2.1, 24-APR-2010 (EDW)
Minor edit to code comments eliminating typo.
-CSPICE Version 1.2.0, 22-OCT-1998 (NJB)
Made input vectors const.
-CSPICE Version 1.1.0, 06-MAR-1998 (EDW)
Removed non printing character.
-CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
perpendicular component of a 3-vector
Link to routine vperp_c source file vperp_c.c
|