Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/surfnm_c.html
Дата изменения: Sat Dec 17 06:09:57 2005 Дата индексирования: Mon Apr 11 00:11:25 2016 Кодировка: |
This routine computes the outward-pointing, unit normal vector from a point on the surface of an ellipsoid.
None.
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- a I Length of the ellisoid semi-axis along the x-axis. b I Length of the ellisoid semi-axis along the y-axis. c I Length of the ellisoid semi-axis along the z-axis. point I Body-fixed coordinates of a point on the ellipsoid normal O Outward pointing unit normal to ellipsoid at point
a This is the length of the semi-axis of the ellipsoid that is parallel to the x-axis of the body-fixed coordinate system. b This is the length of the semi-axis of the ellipsoid that is parallel to the y-axis of the body-fixed coordinate system. c This is the length of the semi-axis of the ellipsoid that is parallel to the z-axis of the body-fixed coordinate system. point This is a 3-vector giving the bodyfixed coordinates of a point on the ellipsoid. In bodyfixed coordinates, the semi-axes of the ellipsoid are aligned with the x, y, and z-axes of the coordinate system.
normal A unit vector pointing away from the ellipsoid and normal to the ellipsoid at point.
None.
This routine computes the outward pointing unit normal vector to the ellipsoid having semi-axes of length a, b, and c from the point point.
A typical use of surfnm_c would be to find the angle of incidence of the light from the sun at a point on the surface of an ellipsoid. Let q be a 3-vector representing the rectangular body-fixed coordinates of a point on the ellipsoid (we are assuming that the axes of the ellipsoid are aligned with the axes of the body fixed frame.) Let v be the vector from q to the sun in bodyfixed coordinates. Then the following code fragment could be used to compute angle of incidence of sunlight at q. surfnm_c ( a, b, c, q, nrml ); incidn = vsep_c ( v, nrml );
It is assumed that the input point is indeed on the ellipsoid. No checking for this is done.
1) If any of the axes are non-positive, the error SPICE(BADAXISLENGTH) will be signalled.
None.
W.L. Taber (JPL) N.J. Bachman (JPL)
None.
-CSPICE Version 1.3.0, 22-OCT-1998 (NJB) Made input vector const. -CSPICE Version 1.2.0, 08-FEB-1998 (NJB) Removed local variables used for temporary capture of outputs. -CSPICE Version 1.0.0, 25-OCT-1997 (NJB) Based on SPICELIB Version 1.2.0, 07-AUG-1996 (WLT)
surface normal vector on an ellipsoid