Using Tencent CDN and Cloudflare CDN Services Simultaneously
For websites providing both Chinese and English services, balancing access speed for domestic and international users is very important.……
春江暮客的个人学习分享网站
The butterfly curve, discovered by Temple H. Fay, is a beautiful curve that can be expressed using a polar coordinate function. Because of its elegance, I wanted to use it as my blog’s favicon.ico. Here, I’ll use Python’s matplotlib.pyplot package to draw the desired butterfly curve. First, let’s admire the beautiful butterfly curve.

It can also be expressed using spherical coordinates:
matplotlib.pyplot as the Plotting Tool in Pythonimport numpy as np
import matplotlib.pyplot as plt
t = np.arange(0.0, 12*np.pi, 0.01)
x = np.sin(t)*(np.e**np.cos(t) - 2*np.cos(4*t)-np.sin(t/12)**5)
y = np.cos(t)*(np.e**np.cos(t) - 2*np.cos(4*t)-np.sin(t/12)**5)
numpy functions with plt to draw the required imageplt.figure(figsize=(8,6))
plt.axis('off')
plt.plot(x,y,color='blue',linewidth = '2')
#plt.show()
plt.savefig("butter.jpg",dpi=400)

Pillow to resize the image to an appropriate size for a faviconfrom PIL import Image
im = Image.open("butter.jpg")
favicon = im.resize((50,50))
favicon.save("favicon.ico")
