Advertisement
atm-irbis

Numpy experiment #1

Mar 27th, 2013
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import numpy as np
  2. import pylab as plt
  3. def cannabis(phi):
  4.     return 1+np.sin(phi)*(1+0.9*np.cos(8*phi))*(1+0.1*np.cos(24*phi))
  5. phi = np.arange(0,360,0.1)
  6. r = cannabis(phi)
  7. x = r*np.cos(phi)
  8. y = r*np.sin(phi)
  9. plt.plot(x,y,'g')
  10. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement