Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from numpy import *
- from math import *
- import matplotlib.pyplot as plt
- from mpl_toolkits.mplot3d import Axes3D
- fig = plt.figure()
- ax = fig.add_subplot(111, projection='3d')
- rad = radians
- x = array([0 for x in range (600)])
- y = array([0 for x in range (600)])
- z = array([0 for x in range (600)])
- for s in range(300):
- for t in range(300):
- x[s] = round(cos(rad(t))*s) + 300
- y[t] = round(sin(rad(s))*t) + 300
- z[s] = t
- map = x, y, z
- fig = Axes3D.plot_surface(x, y, z, rstride=1, cstride=1, cmap=cm.coolwarm,
- linewidth=0, antialiased=True)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment