Index Page
cspice_inelpl
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_INELPL finds the intersection of an ellipse and a plane.

   For important details concerning this module's function, please refer to
   the CSPICE routine inelpl_c.

I/O


   Given:

      ellips   a scalar SPICE ellipse structure. The structure has the fields:

                 center:    [3-array double]
                 semiMajor: [3-array double]
                 semiMinor: [3-array double]

      plane    a scalar SPICE plane structure. The intersection of 'plane'
               and 'ellips' is sought. The structure has the fields:

                 normal:   [3-array double]
                 constant: [scalar double]

   the call:

      cspice_inelpl, ellips, plane, nxpts, xpt1, xpt2

   returns:

      nxpts   scalar integer number of points of intersection of the
              geometric plane and ellipse represented by 'plane'
              and 'ellips'. 'nxpts' may take the values 0, 1, 2 or
              -1.  The value -1 indicates that the ellipse lies
              in the plane, so the number of intersection points
              is infinite.

              -1 also signals for the degenerate case where the ellipse
              structure defines a single point and that point lies
              in the plane of interest. In this case, -1 means not an
              infinite number of intersections, rather that the
              ellipse is a subset of the plane, that subset having
              measure one.

      xpt1,
      xpt2    double precision 3-vectors points of intersection of the input
              plane and ellipse. If there is only one intersection point,
              both 'xpt1' and 'xpt2' contain that point. If the number of
              intersection points is zero or infinite, the contents of
              'xpt1' and 'xpt2' are undefined.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      ;;
      ;; Standard SPK, LSK, PCK files.
      ;;
      cspice_furnsh, 'standard.tm'

      ;;
      ;; Retrieve the triaxial radii of Saturn (699)
      ;;
      cspice_bodvrd, 'SATURN', 'RADII', 3, radii

      ;;
      ;; Define a position in the body frame at one hundred equatorial
      ;; radii out along the x axis, one hundred radii above the
      ;; equatorial plane.
      ;;
      vertex = [ 100.d0 * radii[0], 0.d0, radii[0] *100.d0 ];

      ;;
      ;; Find the limb of the ellipsoid as seen from the
      ;; point 'vertex'. 'limb' returns as a CSPICE_ELLIPSE.
      ;;
      cspice_edlimb, radii[0], radii[1], radii[2], vertex, limb

      ;;
      ;; Define the equatorial plane as a SPICE plane. The Z
      ;; axis is normal to the plane, the origin lies in the
      ;; plane.
      ;;
      normal = [ 0.d, 0.d, 1.d]
      point  = [ 0.d, 0.d, 0.d]
      cspice_nvp2pl , normal, point, plane

      ;;
      ;; Calculate the intersection of the 'limb' and
      ;; 'plane'.
      ;;
      cspice_inelpl, limb, plane, nxpts, xpt1, xpt2

      print, 'Observer at (100, 0, 100) radii, no. intersection points: ',nxpts
      print, '   Intersection points'
      print, xpt1
      print, xpt2
      print, ' '

      ;;
      ;; One hundred radii along the Z pole vector (positive)
      ;;
      vertex = [ 0.d0 * radii[0], 0.d0, radii[0] *100.d0 ];

      ;;
      ;; The resulting limb ellipse should lie parallel to, but
      ;; not in the same plane as the equatorial plane. No
      ;; intersection should exist.
      ;;
      cspice_edlimb, radii[0], radii[1], radii[2], vertex, limb
      cspice_inelpl, limb, plane, nxpts, xpt1, xpt2

      print, 'Ellipse/plane parallel case, no. intersection points: ',nxpts
      print, ' '

      ;;
      ;; One radii along the X axis, i.e. on the surface, a very
      ;; degenerate case.
      ;;
      vertex = [ radii[0], 0.d0, 0.d0 ];

      ;;
      ;; In this case the limb ellipse exists as a point at (x, 0, 0).
      ;;
      cspice_edlimb, radii[0], radii[1], radii[2], vertex, limb

      ;;
      ;; Calculate the intersection of the plane and the degenerate ellipse.
      ;;
      cspice_inelpl, limb, plane, nxpts, xpt1, xpt2

      ;;
      ;; As the point (x, 0, 0) exists in 'plane' and that point represents
      ;; the complete ellipse, the routine should return -1 for infinite
      ;; number of intersections - though in this case the intersection contains
      ;; only one element.
      ;;
      print, 'Degenerate case, no. intersection points: ', nxpts

      ;;
      ;; It's always good form to unload kernels after use,
      ;; particularly in IDL due to data persistence.
      ;;
      cspice_unload, 'standard.tm'

   IDL outputs for the first example:

         Observer at (100, 0, 100) radii, no. intersection points:       2
            Intersection points
               602.68000       60264.987   3.1583792e-12
               602.68000      -60264.987  -9.3798933e-12

   IDL outputs for the second example, we expect no intersection:

         Ellipse/plane parallel case, no. intersection points:           0

   IDL outputs for the degenerate case:

         Degenerate case, no. intersection points:                      -1

Particulars


   This routine computes the intersection set of a non-degenerate
   plane with a possibly degenerate ellipse. The ellipse is allowed
   to consist of a line segment or a point.

   A plane may intersect an ellipse in 0, 1, 2, or infinitely many
   points. For there to be an infinite set of intersection points,
   the ellipse must lie in the plane and consist of more than one

Required Reading


   ICY.REQ
   ELLIPSES.REQ
   PLANES.REQ

Version


   -Icy Version 1.0.1, 21-JUN-2011, EDW (JPL)

      Edits to comply with NAIF standard for Icy headers. Particulars section
      now parallels Mice version.

   -Icy Version 1.0.0, 20-OCT-2006, EDW (JPL)

Index_Entries


   intersection of ellipse and plane




Wed Apr  5 17:58:02 2017