Advertisement
iSach

Untitled

Dec 7th, 2023
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. import matplotlib as mpl
  2. from matplotlib import pyplot as plt
  3. import numpy as np
  4.  
  5. mpl.rcParams.update({
  6. 'text.usetex': True,
  7. 'text.latex.preamble': r'\usepackage{amsfonts}'
  8. })
  9.  
  10. N_ts = 3_000_000
  11. ts = np.exp(np.random.uniform(0, 2*np.pi, 2 * N_ts) * 1j)
  12. ts = ts.reshape((N_ts, 2))
  13. K = ts[:,1]**4 - 1.0j * ts[:,1]**2 - 1.0
  14. J = ts[:,0]**4 + ts[:,0]**2 - 1.0j * ts[:,0] - 1.0
  15. z1 = (-K + np.sqrt(K**2 - 32*J)) / 16
  16. z2 = (-K - np.sqrt(K**2 - 32*J)) / 16
  17. x1 = np.sqrt(z1)
  18. x2 = np.sqrt(z2)
  19. x3 = -np.sqrt(z1)
  20. x4 = -np.sqrt(z2)
  21. pts = np.column_stack([x1, x2, x3, x4]).flatten()
  22.  
  23. fig,ax = plt.subplots(figsize=(30,30))
  24. fig.set_facecolor("#f4f0e7")
  25. fig.subplots_adjust(left=0, bottom=0, right=1, top=1, wspace=None, hspace=None)
  26. for spine in ['top', 'right','left','bottom']:
  27. ax.spines[spine].set_visible(False)
  28. ax.scatter(
  29. x=pts.real,
  30. y=pts.imag,
  31. c="#262626",
  32. s=0.035,
  33. linewidths=1e-6)
  34. ax.set_axis_off()
  35. ax.set_aspect('equal')
  36. ax.set_title('$8.0x^4+(1.0t_2^4-1.0it_2^2-1.0)x^2+1.0t_1^4+1.0t_1^2-1.0it_1-1.0$ \n' + r'$t_1,t_2 \in \mathbb{C}, \ \ \ |t_1|=|t_2|=1$', fontsize=50)
  37. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement