colour.algebra.polar_to_cartesian#
- colour.algebra.polar_to_cartesian(a: ArrayLike) NDArrayFloat[source]#
Transform specified polar coordinates array \(\rho\phi\) (radial coordinate, angular coordinate) to Cartesian coordinates array \(xy\).
- Parameters:
a (ArrayLike) – Polar coordinates array \(\rho\phi\) to transform where \(\rho\) is the radial coordinate in range [0, +inf] and \(\phi\) is the angular coordinate 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...])