Turtle Wax: LOGO-style graphics re-imagined for JavaScript and HTML5 Canvas

I was feeling nostalgic over the holidays, and extolling the virtues of one of the first languages I enjoyed as a kid: LOGO. Then I dug back into the syntax of LOGO. Compared to modern programming languages, words like “terse” and “arcane” spring to mind.

I decided I wasn’t that nostalgic after all, but I did want to bring some of the cool graphics capabilities of that venerable language to JavaScript.

Instead of making a LOGO interpreter in JavaScript (it’s been done), I made a small API to achieve turtle graphics in a more familiar setting.

Check out a couple code demos

Be sure to view source on these pages:

Spirograph inspired designs

Fractal trees translated from a LOGO example

How it works

The API attaches itself to a canvas tag, and supports chaining. I also decided to add some convenient methods for more traditional cartesian and polar coordinate systems.

More info can be found at the project page on GitHub. The open source project is in its early stages, but it’s already fun and potentially useful. Enjoy!

Endorse davebalmer on Coderwall submit to reddit
comments powered by Disqus