A library by George Bashi and Ollie Glass for the programming environment Processing. Last update, 04/14/2010.

The Terrapin library provides a turtle drawing object in Processing. Designed with LOGO's educational principles in mind, the turtle presents uncomplicated commands and an intuitive metaphor to the new programmer. Teaching with the turtle offers a gentle introduction to the imperative, procedural and abstract thinking skills needed by new programmers.

As well as the standard forwards, backwards and turn commands, the turtle can draw with Processing-like moveToward commands that take x and y co-ordinates. For the teacher and student, these methods ease the transition from first-person turtle geometry to Processing's Euclidian geometry.

For more advanced learners, the library offers a HistoryTerrapin which stores the lines it draws and makes them available for editing. The HistoryTerrapin contains a publicly accessible ArrayList holding individual Line objects, extending the turtle metaphor and providing a visual way in to using objects and collections in Processing.


Download Terrapin version 1.0.1 in .zip format.


Unzip and put the extracted Terrapin folder into the libraries folder of your processing sketches. Reference and examples are included in the Terrapin folder.


Email George Bashi and Ollie Glass with any questions, comments etc.


Find a list of examples in the current distribution of Terrapin, or have a look at them by following the links below.

  1. Start with the HelloTerrapin example to see how to create and move the terrapin in a simple Processing sketch.
  2. The Spirograph examples shows how to use movement in the draw loop to create a spirograph-like effect.
  3. By adding an integer, the Increment example changes the Terrapin's movement in each cycle of the draw loop, creating a spiral.