python画桃心代码
import numpy as np
import matplotlib.pyplot as plt
for a in range(1,100):
x = np.linspace(-1.78,1.78,100000)
y = np.sqrt(np.abs(x)**3)+np.exp2(0.8)*np.sqrt(np.abs(np.pi - x**2))*np.sin(a*np.pi*x)
plt.clf()
plt.plot(x,y,"r")
plt.pause(0.1)
plt.ioff()
plt.show()