Previous section-----Next section


XYZToSpherical[{x, y, z}] converts the given point from Cartesian to spherical coordinates and returns {radius, baseangle, altitudeangle}.

XYZToSpherical accepts the Coordinates option to specify the relationship between the two coordinate systems. By default, altitudeangle is measured in the Z direction and a baseangle of zero results from a Y coordinate of zero. Coordinates->YZX causes altitudeangle to be measured in the X direction, etc.
• More complicated coordinate reorientations require a rotation matrix.
• See also: CylindricalToXYZ, SphericalToXYZ, XYZ, XYZToCylindrical, ZXY.

Further Examples

Load the Modeler3D package.

Here is a vector in Cartesian coordinates converted to cylindrical.

Here it is converted back to Cartesian, but with a different ordering of x, y, and z.

Here is a vector in spherical coordinates converted to Cartesian.

Converting this back to spherical coordinates yields something that requires a few assumptions to be reduced to its original form.

Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information