nvc2pl_c |

Table of contents## Procedurenvc2pl_c ( Normal vector and constant to plane ) void nvc2pl_c ( ConstSpiceDouble normal[3], SpiceDouble konst, SpicePlane * plane ) ## AbstractMake a SPICE plane from a normal vector and a constant. ## Required_ReadingPLANES ## KeywordsGEOMETRY MATH PLANE ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- normal, konst I A normal vector and constant defining a plane. plane O A SPICE plane structure representing the plane. ## Detailed_Inputnormal, konst are, respectively, a normal vector and constant defining a plane. normal need not be a unit vector. Let the symbol < a, b > indicate the inner product of vectors a and b; then the geometric plane is the set of vectors x in three-dimensional space that satisfy < x, normal > = konst. ## Detailed_Outputplane is a SPICE plane structure that represents the geometric plane defined by `normal' and `konst'. ## ParametersNone. ## Exceptions1) If the input vector `normal' is the zero vector, the error SPICE(ZEROVECTOR) is signaled. ## FilesNone. ## ParticularsCSPICE geometry routines that deal with planes use the `plane' data type to represent input and output planes. This data type makes the routine interfaces simpler and more uniform. The CSPICE routines that produce SPICE planes from data that define a plane are: ## ExamplesThe numerical results shown for these examples may differ across platforms. The results depend on the SPICE kernels used as input, the compiler and supporting libraries, and the machine specific arithmetic implementation. 1) Construct a SPICE plane from a normal vector and a constant. Example code begins here. /. Program nvc2pl_ex1 ./ #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local variables. ./ SpiceDouble konst; SpicePlane plane; SpiceDouble okonst; SpiceDouble onorml [3]; /. Set the normal vector and the constant defining the plane. ./ SpiceDouble normal [3] = { 1.0, 1.0, 1.0 }; konst = 23.0; printf( "Inputs:\n" ); printf( " Normal vector: %11.7f %11.7f %11.7f\n", normal[0], normal[1], normal[2] ); printf( " Constant : %11.7f\n", konst ); printf( " \n" ); /. Make a SPICE plane from `normal' and `konst'. `normal' need not be a unit vector. ./ ## Restrictions1) No checking is done to prevent arithmetic overflow. ## 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) ## Version-CSPICE Version 1.1.0, 24-AUG-2021 (JDR) Edited the header to comply with NAIF standard. Added complete code examples. Changed the input argument name "constant" to "konst" for consistency with other routines. -CSPICE Version 1.0.1, 02-NOV-2009 (NJB) Corrected header typo. -CSPICE Version 1.0.0, 01-MAR-1999 (NJB) ## Index_Entriesnormal vector and constant to plane |

Fri Dec 31 18:41:10 2021