프로그래밍/Python

[python] Blackhole Glow using python

홍반장水_ 2025. 9. 4. 09:17
반응형

[python] Blackhole Glow using python

 

import matplotlib.pyplot as plt, numpy as np
plt.style.use("dark_background")
O = np.linspace(0, 10*np.pi, 2000)
r = 1/(1+0.2*O)
x, y = r*np.cos(O), r*np.sin(O)
plt.scatter(x, y, c=O, cmap="magma", s=3)
plt.axis("equal");
plt.show()

 

반응형