TurtleGFX - an open-source Turtle Graphics library for p5.js

Hello community,

I want to introduce you an open-source Turtle Graphics library for p5.js sketches.
This library is great for both education and creative coding.

Library supports two modes:

  • Easy Mode / Default turtle mode . This is the default mode. In this mode users can work directly with the global TurtleGFX API such as: forward(), left(), right(), etc.
  • Multiple turtles mode . In this mode users can create multiple turtles on the screen ( let turtle = createTurtle(); turtle.forward(); etc. );

The API has been designed to be closely compatible with popular Turtle Graphics libraries from other languages, such as Python / Logo. In this way you can easily port programs from those languages to JavaScript.

Source code on GitHub:

Online examples:

Note: This library is built-in into codeguppy.com coding environment… but this time was also released as a standalone library for p5.js sketches.

Happy Coding!


Thank you so much for sharing this library – very cool, and very nice demo collection.

1 Like