colour.algebra.cylindrical_to_cartesian

colour.algebra.cylindrical_to_cartesian(a)[source]

Transforms given cylindrical coordinates array \(\rho\phi z\) (azimuth, radial distance and height) to cartesian coordinates array \(xyz\).

Parameters

a (array_like) – Cylindrical coordinates array \(\rho\phi z\) to transform, \(\rho\) is in range [0, +inf], \(\phi\) is in range [-pi, pi] radians i.e. [-180, 180] degrees, \(z\) is in range [0, +inf].

Returns

Cartesian coordinates array \(xyz\).

Return type

ndarray

References

[Wik06a], [Wik05b]

Examples

>>> a = np.array([3.16227766, 0.32175055, 6.00000000])
>>> cylindrical_to_cartesian(a)  
array([ 3.        ,  0.9999999...,  6.        ])