Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- def cannabola(theta):
- return (1+np.sin(theta))*(1-0.9*abs(np.sin(4*theta)))*(0.9+0.05*np.cos(200*theta))
- def plot_polar():
- start=0
- end=2*np.pi
- theta = np.linspace(start, end, 1000)
- r = list(map(cannabola, theta))
- ax = plt.subplot(111, polar=True)
- ax.plot(theta, r,color="green")
- ax.set_rticks([])
- ax.grid(True)
- plt.show()
- plot_polar()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement