yazdmich

Untitled

Jun 3rd, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. from numpy import *
  2. from math import *
  3. import matplotlib.pyplot as plt
  4. from mpl_toolkits.mplot3d import Axes3D
  5. fig = plt.figure()
  6. ax = fig.add_subplot(111, projection='3d')
  7.  
  8. rad = radians
  9.  
  10. x = array([0 for x in range (600)])
  11. y = array([0 for x in range (600)])
  12. z = array([0 for x in range (600)])
  13.  
  14. for s in range(300):
  15. for t in range(300):
  16. x[s] = round(cos(rad(t))*s) + 300
  17. y[t] = round(sin(rad(s))*t) + 300
  18. z[s] = t
  19.  
  20. map = x, y, z
  21.  
  22. fig = Axes3D.plot_surface(x, y, z, rstride=1, cstride=1, cmap=cm.coolwarm,
  23. linewidth=0, antialiased=True)
  24.  
  25. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment