Home > Art, Fractals, Graphics, Python, Uncategorized > Faster turtles

Faster turtles

Using the Python Imaging Library I’ve created a faster alternative to the turtle.py module. It takes only a few seconds to draw images that were taking several minutes with turtle.py.

There are a few downsides to this approach I suppose:

  • There is no on-screen animation of the image being created which is useful tool when teaching turtle graphics — only a finished image is created.
  • Output is a raster image, not a nice svg or eps file.

On the up side:

  • Super fast
  • Antialiased
  • All Python Imaging Library tools and methods also available.
  • At the moment is largely compatible with the turtle.py module

Who knows… once I’ve got the code into a more finished state I may share my fast-turtle module with the world.

Here’s a nice animation that I created with my aforementioned fast turtle module:

Advertisement
  1. Wissme
    July 25, 2011 at 5:58 am | #1

    I’m VERY interested in your fast turtle, as in Python 3.2.1 turtlegraphics are not usable for complex images. What a perversion of MVC to get drawing objects instead of a raster image ! Thanks to send it !
    wissme at hotmail dot com

    • September 18, 2011 at 3:10 pm | #2

      Please find the code for “imgturtle” here. You will need to have Python image Library and Aggdraw modules installed.

  2. September 18, 2011 at 3:20 am | #3

    I’d be interested in your new version of turtle. I’ve been using Python’s default turtle for a new intro programming course I am working on, but I’ve run into the same limitations you have. Willing to share for an experiment if you haven’t posted the code anywhere yet? Please? :-D

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.