DEV Community

Tony Colston
Tony Colston

Posted on

1

mandelbrot with turtles and Python

I used Python turtles to draw an image of the madelbrot set.

Here is the code I found on the internet that does the math part.
https://www.codingame.com/playgrounds/2358/how-to-plot-the-mandelbrot-set/mandelbrot-set

But I wanted to draw this with a turtle.

All of my code is here in this gist
https://gist.github.com/tonetheman/806a4fe0924af085d614557c0ccb85e3

It is fairly slow to run and the UI locks up... but it will make a nice picture.

Crazy that you do this in turtle (though not too quickly).

And here is the image that the code will output
picture of mandelbrot set fractal

Top comments (0)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay