daily pastebin goal
8%
SHARE
TWEET

itower

a guest Jan 24th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2.  
  3. import matplotlib.pyplot as plt
  4. import numpy as np
  5. from matplotlib import cm
  6. from mpl_toolkits.mplot3d import Axes3D
  7.  
  8. i = complex(0, 1)
  9. height = [x for x in range(0,100)]
  10. real = []
  11. imag = []
  12.  
  13. def tower(x, n):
  14.     result = 0
  15.     for _ in range(0, n + 1):
  16.         result = x**result
  17.     return result
  18.  
  19.  
  20. for a in range(1, 101):
  21.     r = tower(i, a)
  22.     real.append(r.real)
  23.     imag.append(r.imag)
  24.  
  25. fig = plt.figure()
  26. ax = fig.add_subplot(111, projection='3d')
  27. x, y, z = real, imag, height
  28. ax.plot3D(x, y, z)
  29. plt.show()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top