Julia alternative for turtle graphics

A while back I made a nice visualization of the Ramanujan tau function using python turtle graphics, which I made for the 100th anniversary of this function. The turtle interface was very nice for making the graphics, what’s the best Julia alternative to achieve very similar graphics?




A declarative graphics (non-turtle!) package is Compose.
There’s a “lines to circle outline” example in the Compose docs.


Note that in my example above, a new display window is opened, and the turtle drawing out the graphics is effectively a live animation. It’s kind of like a screensaver, that continues animating until you tell it to stop. Can these solutions do that also?

Making a static image is useful also, but what I’m after is the live animation of the turtle.

Yes and no, from Luxor.jl - animations are easy enough, but Luxor’s :turtle:’s aren’t built for speed (or indeed any kind of animation). For live graphics, you’d be better off with Makie.jl or something that does live updating in a window…



The image (gif?) of the live turtle drawing of the Peano space filling curve is most impressive. Is the accompanying code available anywhere? (I’m giving a short talk on Lindenmayer systems, and although I can draw a completed structure, it would be fun to show an animation.) Thank you!

1 Like

@cormullion ^

The code to make that Hilbert curve animation is here. This wasn’t done with an L-system like the one here (although it could have been).

If you suddenly get the urge to jump up and dance to animated Hilbert curves, then you can try watching this. :slight_smile:

1 Like

Thank you! That YouTube video is quite fantastic. If I can get an animation - even a slow one - running in Luxor, I can save it as a video file of some sort and then speed it up with ffmpeg. I’ve only got a few days to prepare my talk (which is only a short one), and it may be that colour and movement will not be emphasised.