import numpy as np
import matplotlib.pyplot as pl
t = np.linspace(0,2*np.pi,100)
x = 16*np.sin(t)**3
y = 13*np.cos(t) - 5*np.cos(2*t) - 2 * np.cos(3*t) - np.cos(4*t)
pl.plot(x,y,'r')
pl.axis([-25,25,-20,15])
pl.show()
Draw Heart with Python
最新推荐文章于 2024-06-17 17:35:06 发布