inedpl_c

Index Page inedpl_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void inedpl_c ( SpiceDouble           a,
                       SpiceDouble           b,
                       SpiceDouble           c,
                       ConstSpicePlane     * plane,
                       SpiceEllipse        * ellipse,
                       SpiceBoolean        * found    )
#### Abstract
       Find the intersection of a triaxial ellipsoid and a plane.
#### Required_Reading
       ELLIPSES
       PLANES
#### Keywords
       ELLIPSE
       ELLIPSOID
       GEOMETRY
       MATH
#### Brief_I/O
       Variable  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.
       plane      I   Plane that intersects ellipsoid.
       ellipse    O   Intersection ellipse, when found is SPICETRUE.
       found      O   Flag indicating whether ellipse was found.
#### Detailed_Input
       a,
       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.

       plane          is a CSPICE plane.
#### Detailed_Output
       ellipse        is the CSPICE ellipse formed by the intersection
                      of the input plane and ellipsoid. ellipse will
                      represent a single point if the ellipsoid and
                      plane are tangent.

                      If the intersection of the ellipsoid and plane is
                      empty, ellipse is not modified.

       found          is SPICETRUE if and only if the intersection of the
                      ellipsoid and plane is non-empty.
#### Parameters
       None.
#### Exceptions
       1)  If any of the lengths of the semi-axes of the input ellipsoid
           are non-positive, the error SPICE(DEGENERATECASE) is
           signalled. ellipse is not modified. found is set to SPICEFALSE.

       2)  If the input plane in invalid, the error will be diagnosed by
           routines called by this routine. ellipse is not modified.
           found is set to SPICEFALSE.

       3)  If the input plane and ellipsoid are very nearly tangent,
           roundoff error may cause this routine to give unreliable
           results.

       4)  If the input plane and ellipsoid are precisely tangent, the
           intersection is a single point.  In this case, the output
           ellipse is degenerate, but found will still have the value
           SPICETRUE.  You must decide whether this output makes sense for
           your application.
#### Files
       None.
#### Particulars
       An ellipsoid and a plane can intersect in an ellipse, a single
       point, or the empty set.
#### Examples
       1)  Suppose we wish to find the limb of a body, as observed from
           location loc in body-fixed coordinates.  The CSPICE routine
           edlimb_c solves this problem.  Here's how inedpl_c is used in
           that solution.

           We assume loc is outside of the body. The body is modelled as
           a triaxial ellipsoid with semi-axes of length a, b, and c.
           The notation

              < x, y >

           indicates the inner product of the vectors x and y.

           The limb lies on the plane defined by

              < x,  n >  =  1,

           where the vector n is defined as

                          2              2              2
              ( loc[0] / a ,   loc[1] / b ,   loc[2] / c  )

           The assignments

              n[0] = loc[0] / (a*a);
              n[1] = loc[1] / (b*b);
              n[2] = loc[2] / (c*c);

           and the calls

              nvc2pl_c ( n,  1.0,  &plane );

              inedpl_c ( a,  b,  c,  &plane,  &limb, &found );

              el2cgv_c ( limb, center, smajor, sminor );

           will return the center and semi-axes of the limb.

           How do we know that  < x, n > = 1  for all x on the limb?
           This is because all limb points x satisfy

              < loc - x, surfnm(x) >  =  0,

           where surfnm(x) is any surface normal at x.  surfnm(x) is
           parallel to the vector

                             2            2            2
              v = (  x[0] / a ,   x[1] / b ,   x[2] / c   )

           so we have

              < loc - x, v >  =  0,

              < loc, v >      =  < x, v >  =  1  (from the original
                                                  ellipsoid
                                                  equation)
           and finally

              < x, n >  =  1

           where n is as defined above.

       2)  Suppose we wish to find the terminator of a body.  We can
           make a fair approximation to the location of the terminator
           by finding the limb of the body as seen from the vertex of
           the umbra; then the problem is essentially the same as in
           example 1.  Let VERTEX be this location.  We make the
           assignments

              p[0] =   vertex[0] / (a*a);
              p[1] =   vertex[1] / (b*b);
              p[2] =   vertex[2] / (c*c);

           and then make the calls

              nvc2pl_c ( p,  1.0,  &plane );

              inedpl_c ( a,  b,  c,  &plane, &term, &found );

           The CSPICE ellipse term represents the terminator of the
           body.
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman   (JPL)
#### Version
       -CSPICE Version 1.0.5, 06-FEB-2003 (EDW)

          Corrected a typo in the header documentation,
          input variable 'ellipse' not 'ellips'

       -CSPICE Version 1.0.0, 13-JUN-1999 (NJB)
#### Index_Entries
       intersection of ellipsoid and plane
#### Link to routine inedpl_c source file inedpl_c.c

    Thu Apr 16 08:58:20 2009