I have a closed path generated in polar coordinates as shown below
import matplotlib.pyplot as plt
import numpy as np
%matplotlib qt
horizon_az = np.array([41, 66, 115, 220, 300, 41])
horizon_alt = np.array([16, 15, 10, 23, 33, 16])
ax = plt.subplot(111, projection='polar')
ax.plot(horizon_az * np.pi / 180, horizon_alt, 'r', linewidth=3)
How can I check if a specific point say (0, 0) is inside this path?
While one can use the Path.contains_point
method from matplotlib.path
for Cartesian coordinates as shown here, how does one take into account the polar coordinate transformation?