polar_to_cartesian

luminet.spatial.polar_to_cartesian(th: float | numpy.ndarray, radius: float | numpy.ndarray, rotation: float = 0) float | numpy.ndarray

Convert polar to cartesian coordinates.

Parameters:
  • th (float | np.ndarray) – angle in radians

  • radius (float | np.ndarray) – radius

  • rotation (float) – Amount of radians to rotate the result. Useful when messing with the orientation of polar plots.

Returns:

Tuple[float | ndarray] – x and y coordinates