Python and Turtle Difficulty Level 6,loop,math Butterfly Curve with Python Turtle

Butterfly Curve with Python Turtle

Use the following parametric equations to draw a butterfly curve.

x = 100*(math.sin(t)*(math.exp(math.cos(t))-2*math.cos(4*t)-math.sin(t/12)**5))
y = 100*(math.cos(t)*(math.exp(math.cos(t))-2*math.cos(4*t)-math.sin(t/12)**5))

In the equation above t is the parameter of the equations. Let it range from 0 to 12π gradually with small increment.

Butterfly Curve with Python Turtle

Related Post