CSPICE_INEDPL calculates the intercept of a triaxial ellipsoid
and a plane.
a [1,1] = size(a); double = class(a)
b [1,1] = size(b); double = class(b)
c [1,1] = size(c); double = class(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 respectively point in the
x, y, and z directions.
plane a structure describing a SPICE plane. The intersection of
'plane' and the ellipsoid is sought.
[1,1] = size(plane); struct = class(plane)
The structure has the fields:
normal: [3,1] = size(normal); double = class(normal)
constant: [1,1] = size(constant); double = class(constant)
[ ellipse, found ] = cspice_inedpl( a, b, c, plane )
ellipse a structure describing a SPICE ellipse that defines the
intersection of 'plane' and the ellipsoid.
[1,1] = size(ellipse); struct = class(ellipse)
The structure has the fields:
center: [3,1] = size(center); double = class(center)
semiMajor: [3,1] = size(semiMajor); double = class(semiMajor)
found the boolean indicating whether 'plane'
intersects the ellipsoid (true) or not (false).
[1,1] = size(found); logical = class(found)
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.
Use the meta-kernel shown below to load the required SPICE
This meta-kernel is intended to support operation of SPICE
example programs. The kernels shown here should not be
assumed to contain adequate or correct versions of data
required by SPICE-based user applications.
In order for an application to use this meta-kernel, the
kernels referenced here must be present in the user's
current working directory.
The names and contents of the kernels referenced
by this meta-kernel are as follows:
File name Contents
de421.bsp Planetary ephemeris
pck00009.tpc Planet orientation and
KERNELS_TO_LOAD = ( '/kernels/gen/lsk/naif0009.tls'
% Give a position relative to an ellipsoid, calculate
% the terminator on the ellipsoid as seen from the position.
% As an example, use the view of Earth from the sun.
% Standard SPK, LSK, PCK files.
cspice_furnsh( 'standard.tm' )
% Define the time to calculate the terminator, the reference
% frame, and the light time correction.
TIME = 'Oct 31 2002, 12:55:00 PST';
FRAME = 'J2000';
CORR = 'LT+S';
% Convert the date string to ephemeris time.
et = cspice_str2et( TIME );
% calculate the position of Earth wrt the Sun.
[pos, ltime] = cspice_spkpos( 'EARTH', et, FRAME, CORR, 'SUN' );
% retrieve the triaxial radii of Earth.
radii = cspice_bodvrd( 'EARTH', 'RADII', 3 );
% Normalize the position to factors of the radii.
pos = [ pos(1)/radii(1)^2,
% Create the SPICE plane.
plane = cspice_nvc2pl( pos, 1. );
% Calculate the intercept.
[term, found] = cspice_inedpl( radii(1), radii(2), radii(3), plane );
% Show the ellipse.
center = term.center
smaj = term.semiMajor
smin = term.semiMinor
% What's the length measure of the semimajor axis.
smaj_norm = norm( term.semiMajor )
% What's the length measure of the semiminor axis?
smin_norm = norm( term.semiMinor )
% It's always good form to unload kernels after use,
% particularly in IDL due to data persistence.
An ellipsoid and a plane can intersect in an ellipse, a single point, or
the empty set.
For important details concerning this module's function, please refer to
the CSPICE routine inedpl_c.
-Mice Version 1.0.1, 11-JUN-2013, EDW (JPL)
I/O descriptions edits to conform to Mice documentation format.
-Mice Version 1.0.0, 27-AUG-2012, EDW (JPL)
intersection of ellipsoid and plane