edlimb_c |

Table of contents## Procedureedlimb_c ( Ellipsoid Limb ) void edlimb_c ( SpiceDouble a, SpiceDouble b, SpiceDouble c, ConstSpiceDouble viewpt[3], SpiceEllipse * limb ) ## AbstractFind the limb of a triaxial ellipsoid, viewed from a specified point. ## Required_ReadingELLIPSES ## KeywordsELLIPSE ELLIPSOID GEOMETRY MATH ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- a I Length of ellipsoid semi-axis lying on the x-axis. b I Length of ellipsoid semi-axis lying on the y-axis. c I Length of ellipsoid semi-axis lying on the z-axis. viewpt I Location of viewing point. limb O Limb of ellipsoid as seen from viewing point. ## Detailed_Inputa, b, c are the lengths of the semi-axes of a triaxial ellipsoid. The ellipsoid is centered at the origin and oriented so that its axes lie on the x, y and z axes. a, b, and c are the lengths of the semi-axes that point in the x, y, and z directions respectively. viewpt is a point from which the ellipsoid is viewed. viewpt must be outside of the ellipsoid. ## Detailed_Outputlimb is a SPICE ellipse that represents the limb of the ellipsoid. ## ParametersNone. ## Exceptions1) If the length of any semi-axis of the ellipsoid is non-positive, the error SPICE(INVALIDAXISLENGTH) is signaled by a routine in the call tree of this routine. `limb' is not modified. 2) If the length of any semi-axis of the ellipsoid is zero after the semi-axis lengths are scaled by the reciprocal of the magnitude of the longest semi-axis and then squared, the error SPICE(DEGENERATECASE) is signaled by a routine in the call tree of this routine. `limb' is not modified. 3) If the viewing point `viewpt' is inside the ellipse, the error SPICE(INVALIDPOINT) is signaled by a routine in the call tree of this routine. `limb' is not modified. 4) If the geometry defined by the input ellipsoid and viewing point is so extreme that the limb cannot be found, the error SPICE(DEGENERATECASE) is signaled by a routine in the call tree of this routine. 5) If the shape of the ellipsoid and the viewing geometry are such that the limb is an excessively flat ellipsoid, the limb may be a degenerate ellipse. You must determine whether this possibility poses a problem for your application. ## FilesNone. ## ParticularsThe limb of a body, as seen from a viewing point, is the boundary of the portion of the body's surface that is visible from that viewing point. In this definition, we consider a surface point to be `visible' if it can be connected to the viewing point by a line segment that doesn't pass through the body. This is a purely geometrical definition that ignores the matter of which portions of the surface are illuminated, or whether the view is obscured by any additional objects. If a body is modeled as a triaxial ellipsoid, the limb is always an ellipse. The limb is determined by its center, a semi-major axis vector, and a semi-minor axis vector. We note that the problem of finding the limb of a triaxial ellipsoid is mathematically identical to that of finding its terminator, if one makes the simplifying assumption that the terminator is the limb of the body as seen from the vertex of the umbra. So, this routine can be used to solve this simplified version of the problem of finding the terminator. ## 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) Given an ellipsoid and a viewpoint exterior to it, calculate the limb ellipse as seen from that viewpoint. Example code begins here. /. Program edlimb_ex1 ./ #include <math.h> #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local constants. ./ #define UBEL 9 /. Local variables. ./ SpiceDouble a; SpiceDouble b; SpiceDouble c; SpiceDouble ecentr [3]; SpiceEllipse limb; SpiceDouble smajor [3]; SpiceDouble sminor [3]; /. Define a viewpoint exterior to the ellipsoid. ./ SpiceDouble viewpt [3] = { 2.0, 0.0, 0.0 }; /. Define an ellipsoid. ./ a = sqrt( 2.0 ); b = 2.0 * sqrt( 2.0 ); c = sqrt( 2.0 ); /. Calculate the limb ellipse as seen by from the viewpoint. ./ ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) ## Version-CSPICE Version 1.1.1, 24-AUG-2021 (NJB) (JDR) Edited the header to comply with NAIF standard. Added complete code examples. Corrected two typos in header comments. -CSPICE Version 1.1.0, 24-JUN-2014 (NJB) Edit to correct chkout_c call passing the wrong routine name. -CSPICE Version 1.0.1, 24-OCT-2005 (NJB) Header update: reference to bodvar_c was replaced with reference to bodvcd_c. -CSPICE Version 1.0.0, 13-JUN-1999 (NJB) ## Index_Entriesellipsoid limb |

Fri Dec 31 18:41:05 2021