[frames] | no frames]

# Module coord_transform

source code

Module for transforming between different coordinate systems.

 Functions
numpy rank-1, 3D array
 cartesian_to_spherical(vector) Convert the Cartesian vector [x, y, z] to spherical coordinates [r, theta, phi]. source code

 spherical_to_cartesian(spherical_vect, cart_vect) Convert the spherical coordinate vector [r, theta, phi] to the Cartesian vector [x, y, z]. source code
 Variables
__package__ = `'lib.geometry'`

Imports: acos, atan2, cos, sin, array, float64, norm

 Function Details

### cartesian_to_spherical(vector)

source code

Convert the Cartesian vector [x, y, z] to spherical coordinates [r, theta, phi].

The parameter r is the radial distance, theta is the polar angle, and phi is the azimuth.

Parameters:
• `vector` (numpy rank-1, 3D array) - The Cartesian vector [x, y, z].
Returns: numpy rank-1, 3D array
The spherical coordinate vector [r, theta, phi].

### spherical_to_cartesian(spherical_vect, cart_vect)

source code

Convert the spherical coordinate vector [r, theta, phi] to the Cartesian vector [x, y, z].

The parameter r is the radial distance, theta is the polar angle, and phi is the azimuth.

Parameters:
• `spherical_vect` (3D array or list) - The spherical coordinate vector [r, theta, phi].
• `cart_vect` (3D array or list) - The Cartesian vector [x, y, z].

 Generated by Epydoc 3.0.1 on Fri Jun 14 11:29:06 2019 http://epydoc.sourceforge.net