void reccyl_c ( ConstSpiceDouble rectan[3],
SpiceDouble * r,
SpiceDouble * lon,
SpiceDouble * z )
Convert from rectangular to cylindrical coordinates.
None.
CONVERSION, COORDINATES
VARIABLE I/O DESCRIPTION
-------- --- -------------------------------------------------
rectan I Rectangular coordinates of a point.
r O Distance of the point from Z axis.
lon O Angle (radians) of the point from XZ plane
z O Height of the point above XY plane.
rectan Rectangular coordinates of the point of interest.
r Distance of the point of interest from Z axis.
lon Cylindrical angle (in radians) of the point of
interest from XZ plane. The `lon' range is [0, 2pi].
z Height of the point above XY plane.
None.
Error free.
None.
This routine transforms the coordinates of a point from
rectangular to cylindrical coordinates.
Below are two tables.
Listed in the first table (under x(1), x(2) and x(3) ) are a
number of points whose rectangular coordinates coorindates are
taken from the set {-1, 0, 1}.
The result of the code fragment
reccyl_c ( x, r, lon, z );
Use the CSPICE routine convrt_c to convert the angular
quantities to degrees
convrt_c ( lon, "RADIANS", "DEGREES", lon );
are listed to 4 decimal places in the second parallel table under
r (radius), lon (longitude), and z (same as rectangular z
coordinate).
x(1) x(2) x(3) r lon z
-------------------------- -------------------------
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
1.0000 0.0000 0.0000 1.0000 0.0000 0.0000
0.0000 1.0000 0.0000 1.0000 90.0000 0.0000
0.0000 0.0000 1.0000 0.0000 0.0000 1.0000
-1.0000 0.0000 0.0000 1.0000 180.0000 0.0000
0.0000 -1.0000 0.0000 1.0000 270.0000 0.0000
0.0000 0.0000 -1.0000 0.0000 0.0000 -1.0000
1.0000 1.0000 0.0000 1.4142 45.0000 0.0000
1.0000 0.0000 1.0000 1.0000 0.0000 1.0000
0.0000 1.0000 1.0000 1.0000 90.0000 1.0000
1.0000 1.0000 1.0000 1.4142 45.0000 1.0000
None.
None.
W.L. Taber (JPL)
-CSPICE Version 1.2.1, 26-JUL-2016 (BVS)
Minor headers edits.
-CSPICE Version 1.2.0, 28-AUG-2001 (NJB)
Removed tab characters from source file. Include interface
macro definition header SpiceZim.h.
-CSPICE Version 1.1.0, 21-OCT-1998 (NJB)
Made input vector const.
-CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
rectangular to cylindrical coordinates
Link to routine reccyl_c source file reccyl_c.c
|