void cylsph_c ( SpiceDouble r,
SpiceDouble lonc,
SpiceDouble z,
SpiceDouble * radius,
SpiceDouble * colat,
SpiceDouble * lon )
Convert from cylindrical to spherical coordinates.
None.
CONVERSION
COORDINATES
VARIABLE I/O DESCRIPTION
-------- --- -------------------------------------------------
r I Distance of point from z axis.
lonc I Angle (radians) of point from XZ plane.
z I Height of point above XY plane.
radius O Distance of point from origin.
colat O Polar angle (co-latitude in radians) of point.
lon O Azimuthal angle (longitude) of point (radians).
r Distance of the point of interest from z axis.
lonc Cylindrical angle (radians) of the point from the
XZ plane.
z Height of the point above XY plane.
radius Distance of the point from origin.
colat Polar angle (co-latitude in radians) of the point.
The range of `colat' is [-pi, pi].
lon Azimuthal angle (longitude) of the point (radians).
`lon' is set equal to `lonc'.
None.
Error free.
None.
This returns the spherical coordinates of a point whose position
is input through cylindrical coordinates.
Below are two tables: The first is a set of input values
the second is the result of the following sequence of
calls to Spicelib routines. Note all input and output angular
quantities are in degrees.
convrt_c ( lonc, "DEGREES", "RADIANS", lonc );
cylsph_c ( r, lonc, z, &radius, &colat, &lon );
convrt_c ( lon, "RADIANS", "DEGREES", lon );
convrt_c ( lat, "RADIANS", "DEGREES", lat );
Inputs: Results:
r lonc z radius lon colat
------ ------ ------ ------ ------ ------
1.0000 0 0 1.0000 0 90.00
1.0000 90.00 0 1.0000 90.00 90.00
1.0000 180.00 1.000 1.4142 180.00 45.00
1.0000 180.00 -1.000 1.4142 180.00 135.00
0.0000 180.00 1.000 1.0000 180.00 0.00
0.0000 33.00 0 0.0000 33.00 0.00
None.
None.
E.D. Wright (JPL)
W.L. Taber (JPL)
-CSPICE Version 1.0.2, 26-JUL-2016 (BVS)
Minor headers edits.
-CSPICE Version 1.0.1, 08-FEB-1998 (EDW)
Corrected and clarified header entries.
-CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
cylindrical to spherical
Link to routine cylsph_c source file cylsph_c.c
|