vperp_c |
Table of contents
Procedurevperp_c ( Perpendicular component of a 3-vector ) void vperp_c ( ConstSpiceDouble a[3], ConstSpiceDouble b[3], SpiceDouble p[3] ) AbstractFind the component of a vector that is perpendicular to a second vector. All vectors are 3-dimensional. Required_ReadingNone. KeywordsVECTOR Brief_I/OVARIABLE 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'. Detailed_Inputa 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'. Detailed_Outputp is a double precision, 3-dimensional vector containing the component of `a' that is orthogonal to `b'. `p' may overwrite either `a' or `b'. ParametersNone. ExceptionsError free. FilesNone. ParticularsGiven 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'. ExamplesThe 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) RestrictionsNone. Literature_References[1] G. Thomas and R. Finney, "Calculus and Analytic Geometry," 7th Edition, Addison Wesley, 1988. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) E.D. Wright (JPL) Version-CSPICE Version 1.2.2, 13-APR-2021 (JDR) Updated the header to comply with NAIF standard. -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) (WLT) Index_Entriesperpendicular component of a 3-vector |
Fri Dec 31 18:41:15 2021