Advertisement
EXTREMEXPLOIT

Conicas

Feb 12th, 2020
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. from numpy import sin, cos, tan, sqrt, pi, sinh, cosh
  4. from matplotlib import style
  5. from matplotlib import cm
  6. from mpl_toolkits.mplot3d import Axes3D
  7.  
  8. style.use('dark_background')
  9.  
  10. t, v = np.meshgrid(np.arange(0, 2*pi, 0.25), np.arange(0, 2*pi, 0.25))
  11.  
  12. R1 = 5
  13. X1 = R1*cos(t)
  14. Y1 = R1*sin(t)
  15. Z1 = v
  16.  
  17. R2 = 5
  18. X2 = R2*sin(t)*cos(v)
  19. Y2 = R2*sin(t)*sin(v)
  20. Z2 = R2*cos(t)
  21.  
  22. A, B, C = 2, 5, 10
  23. X3 = A*sin(t)*cos(v)
  24. Y3 = B*sin(t)*sin(v)
  25. Z3 = C*cos(t)
  26.  
  27.  
  28.  
  29. AX = Axes3D(plt.figure())
  30. AX.plot_surface(X1, Y1, Z1, cmap=cm.Blues)
  31. AX.plot_surface(X2, Y2, Z2, cmap=cm.Greens)
  32. AX.plot_surface(X3, Y3, Z3, cmap=cm.Reds)
  33. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement