cspice_surfpt

 Abstract I/O Examples Particulars Required Reading Version Index_Entries
```
```

#### Abstract

```
CSPICE_SURFPT determines the intersection of a line-of-sight vector with
the surface of an ellipsoid.

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

```

#### I/O

```
Given:

positn   the double precision position 3-vector 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 3-vector emanating from
'positn'

a,       the scalar double precision values of the ellipsoid's
c
'a' is length in kilometers of the semi-axis of the ellipsoid
parallel to the x-axis of the body-fixed reference frame

'b' is length in kilometers of the semi-axis of the ellipsoid
parallel to the y-axis of the body-fixed reference frame

'c' is length in kilometers of the semi-axis of the ellipsoid
parallel to the z-axis of the body-fixed reference frame

the call:

cspice_surfpt, positn, view, a, b, c, point, found

returns:

point   a double precision 3-vector 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)

```

#### 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.

;;
;; 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

```

#### Version

```
-Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

```

#### Index_Entries

```
line of sight intercept with body
point of intersection between ray and ellipsoid
surface point of intersection of ray and ellipsoid

```
`Wed Apr  5 17:58:04 2017`