CSPICE_SURFPT determines the intersection of a lineofsight vector with
the surface of an ellipsoid.
For important details concerning this module's function, please refer to
the CSPICE routine surfpt_c.
Given:
positn the double precision position 3vector position
of an observer with respect to the center of an
ellipsoid expressed in the body fixed coordinates of
the ellipsoid
u the double precision direction 3vector emanating from
'positn'
a, the scalar double precision values of the ellipsoid's
b, triaxial radii ellipsoid, where:
c
'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
the call:
cspice_surfpt, positn, view, a, b, c, point, found
returns:
point a double precision 3vector defining the location
on the ellipsoid at which the 'view' intercepts
the ellipsoid if the interception exists, 'point' returns
(0.d, 0.d, 0.d) if 'u' does not intersect the ellipsoid
found a boolean indicating whether the intersection
between the ellipse and 'view' exists (TRUE) or
not (FALSE)
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.d
b = 2.d
c = 3.d
;;
;; Define a reference point and a view vector
;;
positn = [ 2.d, 0.d, 0.d ]
u = [ 1.d, 0.d, 0.d ]
;;
;; Where on the ellipsoid surface (if anywhere) does
;; 'u' intersect the ellipsoid if looking from 'positn'.
;;
cspice_surfpt, positn, u, a, b, c, point, found
if ( found ) then begin
print, "The look vector : ", u
print, "at position : ", positn
print, "intersects the ellipsoid at: ", point
endif else begin
print, "Found no interception point on ellipse."
endelse
IDL outputs:
The look vector : 1.0000000 0.0000000 0.0000000
at position : 2.0000000 0.0000000 0.0000000
intersects the ellipsoid at: 1.0000000 0.0000000 0.0000000
None.
ICY.REQ
ELLIPSES.REQ
Icy Version 1.0.0, 16JUN2003, EDW (JPL)
line of sight intercept with body
point of intersection between ray and ellipsoid
surface point of intersection of ray and ellipsoid
