colour.algebra.polar_to_cartesian

colour.algebra.polar_to_cartesian(a)[source]

Transforms given polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to cartesian coordinates array \(xy\).

Parameters

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

Returns

Cartesian coordinates array \(xy\).

Return type

ndarray

References

[Wikipedia06a], [Wikipedia05b]

Examples

>>> a = np.array([3.16227766, 0.32175055])
>>> polar_to_cartesian(a)  
array([ 3.        ,  0.9999999...])