colour.algebra.polar_to_cartesian#
- colour.algebra.polar_to_cartesian(a: ArrayLike) NDArrayFloat [source]#
Transform given polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to cartesian coordinates array \(xy\).
- Parameters:
a (ArrayLike) – 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:
References
[Wikipedia06a], [Wikipedia05e]
Examples
>>> a = np.array([3.16227766, 0.32175055]) >>> polar_to_cartesian(a) array([ 3. , 0.9999999...])