colour.algebra.spherical_to_cartesian

colour.algebra.spherical_to_cartesian(a)[source]

Transforms given Spherical coordinates array \(\rho\theta\phi\) (radial distance, inclination or elevation and azimuth) to Cartesian coordinates array \(xyz\).

Parameters:a (array_like) – Spherical coordinates array \(\rho\theta\phi\) to transform.
Returns:Cartesian coordinates array \(xyz\).
Return type:ndarray

References

Examples

>>> a = np.array([6.78232998, 1.08574654, 0.32175055])
>>> spherical_to_cartesian(a)  
array([ 3.        ,  0.9999999...,  6.        ])