DEV Community

Tony Colston
Tony Colston

Posted on

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

Discussion (0)