How to convert 3D coordinates
- Choose Cartesian, cylindrical or spherical as the source, then enter only the three visible values.
- Angles use degrees. Azimuth is counterclockwise from +x in the xy-plane; polar angle is from +z and must be 0°–180°.
- Select Calculate to show all three equivalent representations. Editing a value or source mode invalidates the old result.
- Copy records the three forms, including any undefined-angle notice. Clear removes numeric inputs but keeps the selected source.
Formulas and conventions
Cartesian uses signed x, y and z. Cylindrical radius r = √(x²+y²), while spherical radius ρ = √(x²+y²+z²).
Azimuth θ = atan2(y,x). Polar angle φ = atan2(r,z), which is equivalent to arccos(z/ρ) away from the origin.
For cylindrical input, x=r cosθ and y=r sinθ. For spherical input, x=ρ sinφ cosθ, y=ρ sinφ sinθ and z=ρ cosφ.
r = √(x²+y²) · ρ = √(x²+y²+z²) · θ = atan2(y,x) · φ = atan2(r,z)
Worked examples
Cartesian (1, 1, 1)
(1, 1, 1) becomes cylindrical (√2, 45°, 1) and spherical (√3, 45°, about 54.74°).
Spherical (4, 180°, 90°)
Spherical (4, 180°, 90°) becomes Cartesian (−4, 0, 0) and cylindrical (4, 180°, 0).
Limits and undefined angles
- This is mathematical 3D coordinate conversion, not GPS, latitude/longitude, a map, camera pose or 3D rendering.
- Cylindrical and spherical radii may be zero but not negative. Spherical polar angle is limited to 0°–180°; azimuth input may be any degree value and is normalized.
- At the origin, radius is zero and both angles are undefined. The output says so instead of inventing a unique direction.
- On the positive or negative z-axis away from the origin, polar angle is defined but azimuth is not unique; the output marks azimuth undefined.
Frequently asked questions
Why is azimuth sometimes undefined?
Every azimuth points to the same location when x=y=0, so no unique value exists.
Are radians supported?
No. This focused page uses degrees only.
What range is used for output azimuth?
Defined azimuths are normalized to 0° inclusive and 360° exclusive.
Does changing the source convert immediately?
No. A change clears the confirmed result; select Calculate to confirm the new inputs.