CSPICE_SURFNM computes the double precision, outwardpointing
normal unit 3vector at a point defined on the surface of an
ellipsoid.
Given:
a,
b,
c the values of the ellipsoid's triaxial radii ellipsoid, where:
'a' is length in kilometers of the semiaxis of the ellipsoid
parallel to the xaxis of the bodyfixed reference frame
'b' is length in kilometers of the semiaxis of the ellipsoid
parallel to the yaxis of the bodyfixed reference frame
'c' is length in kilometers of the semiaxis of the ellipsoid
parallel to the zaxis of the bodyfixed reference frame
[1,1] = size(a); double = class(a)
[1,1] = size(b); double = class(b)
[1,1] = size(c); double = class(c)
point location(s) on the ellipsoid.
[3,3] = size(point); double = class(point)
or
[3,3,n] = size(point); double = class(point)
the call:
normal = cspice_surfnm( a, b, c, point)
returns:
normal the unit normal(s) to the ellipsoid at 'point' in the direction
away from the ellipsoid
If [3,3] = size(point)
then [3,3] = size(normal); double = class(normal)
If [3,3,n] = size(point)
then [3,3,n] = size(normal); double = class(normal)
'normal' returns with the same vectorization measure, N,
as 'point'.
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.
%
% Define the radii of an ellipsoid.
%
a = 1.;
b = 2.;
c = 3.;
%
% Select a set of locations, three 3vectors.
%
point = [ [ 0.; 0.; 3.], [ 0.; 2.; 0.], [1; 0; 0] ];
%
% Calculate the surface normal to the ellipsoid at 'point'.
%
out_norm = cspice_surfnm( a, b, c, point)
MATLAB outputs:
out_norm =
0 0 1
0 1 0
1 0 0
Three 3vectors:
the normal at (0,0,3) equals (0,0,1)
the normal at (0,2,0) equals (0,0,1)
the normal at (1,0,0) equals (1,0,0)
None.
For important details concerning this module's function, please refer to
the CSPICE routine surfnm_c.
MICE.REQ
Mice Version 1.0.1, 17MAR2015, EDW (JPL)
Edited I/O section to conform to NAIF standard for Mice documentation.
Mice Version 1.0.0, 15JUN2006, EDW (JPL)
surface normal vector on an ellipsoid
