Loading design...

A beautiful white mathematical string butterfly created with Python Turtle. Read the code below, copy it, and try it in your own Python environment.
import math
from turtle import *
tracer(10)
bgcolor('black')
def butterfly_x(h):
return 10 * math.sin(h) * (math.exp(math.cos(h)) - 2 * math.cos(4 * h) - math.sin(h/12)**5)
def butterfly_y(h):
return 10 * math.cos(h) * (math.exp(math.cos(h)) - 2 * math.cos(4 * h) - math.sin(h/12)**5)
for i in range(2500):
goto(butterfly_x(i/50)*8, butterfly_y(i/50)*8)
color('white')
goto(0, 0)
done()