用python 画一颗心,代码:

 

 import numpy as np
 import matplotlib.pyplot as plt

 x = np.linspace(-8 , 8, 1024)
 y1 = 0.618*np.abs(x) - 0.8* np.sqrt(64-x**2)
 y2 = 0.618*np.abs(x) + 0.8* np.sqrt(64-x**2)
 plt.plot(x, y1, color = 'r')
 plt.plot(x, y2, color = 'r')
 plt.show()

 

结果:

用python表白了!!!

 

相关文章:

  • 2021-04-28
  • 2021-10-09
  • 2021-09-30
  • 2021-08-23
  • 2021-06-15
  • 2021-05-12
  • 2021-10-24
  • 2021-11-30
猜你喜欢
  • 2021-09-06
  • 2021-06-08
  • 2021-05-12
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案