edpnt_c |

Table of contents## Procedureedpnt_c ( Ellipsoid point ) void edpnt_c ( ConstSpiceDouble p [3], SpiceDouble a, SpiceDouble b, SpiceDouble c, SpiceDouble ep [3] ) ## AbstractScale a point so that it lies on the surface of a specified triaxial ellipsoid that is centered at the origin and aligned with the Cartesian coordinate axes. ## Required_ReadingNone. ## KeywordsELLIPSOID GEOMETRY MATH ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- p I A point in three-dimensional space. a I Semi-axis length in the X direction. b I Semi-axis length in the Y direction. c I Semi-axis length in the Z direction. ep O Point on ellipsoid. ## Detailed_Inputp is a non-zero point in three-dimensional space. a, b, c are, respectively, the semi-axis lengths of a triaxial ellipsoid in the X, Y, and Z directions. The axes of the ellipsoid are aligned with the axes of the Cartesian coordinate system. ## Detailed_Outputep is the result of scaling the input point `p' so that it lies on the surface of the triaxial ellipsoid defined by the input semi-axis lengths. ## ParametersNone. ## Exceptions1) If any of the target ellipsoid's semi-axis lengths is non-positive, the error SPICE(INVALIDAXES) is signaled by a routine in the call tree of this routine. 2) If `p' is the zero vector, the error SPICE(ZEROVECTOR) is signaled by a routine in the call tree of this routine. 3) If the level surface parameter of the input point underflows, the error SPICE(POINTTOOSMALL) is signaled by a routine in the call tree of this routine. ## FilesNone. ## ParticularsThis routine efficiently computes the ellipsoid surface point corresponding to a specified ray emanating from the origin. Practical examples of this computation occur in the CSPICE routines latsrf_c and srfrec_c. ## ExamplesThe numerical results shown for this example 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) Find the surface intercept point on an ellipsoid having radii ( 3, 2, 1 ) of the ray emanating from the origin and having direction vector ( 1, 1, 1 ) Example code begins here. /. Program edpnt_ex1 ./ #include <math.h> #include <stdio.h> #include "SpiceUsr.h" int main( ) { SpiceDouble a; SpiceDouble b; SpiceDouble c; SpiceDouble v [3]; SpiceDouble ep [3]; SpiceDouble level; a = 3.0; b = 2.0; c = 1.0; vpack_c ( 1.0, 1.0, 1.0, v ); ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionJ. Diaz del Rio (ODC Space) ## Version-CSPICE Version 1.0.0, 08-FEB-2021 (JDR) ## Index_Entriesscale point to lie on ellipsoid |

Fri Dec 31 18:41:05 2021