TurtleStitch: Exploring Shapes and Curves with Coded Embroidery
Year: 2025 Authors: Joek van Montfort; Richard Millwood; Margaret Low
Core claim
Coded embroidery can serve as an accessible medium for exploring and communicating mathematical concepts through aesthetically meaningful textile artworks.
Topics
turtle geometry, coded embroidery, mathematical exploration, workshop pedagogy, fabrication
Domains
geometry, recursion, parametric functions, Fibonacci numbers, curves, textile art, computer art, generative design
Methods
block-based programming, pattern recoding, guided workshop, parameter experimentation, machine embroidery
Media
web browser, embroidery machine, fabric, thread, SVG
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2025 Conference Proceedings
TurtleStitch: Exploring Shapes and Curves with Coded Embroidery
Joek van Montfort , Richard Millwood and Margaret Low
Montessori Lyceum Amsterdam, Amsterdam, The Netherlands; joek@freedom.nl School of Computer Science & Statistics, Trinity College, Dublin, Ireland; millwoor@tcd.ie University of Warwick, Coventry, UK; m.j.low@warwick.ac.uk
Abstract
TurtleStitch is a web based programming environment using Turtle Geometry primarily to design embroideries which can be made on a digital embroidery machine. The designs are made by writing code: child friendly blocks are clicked together to specify the instructions. Mathematical functions and concepts are built in as in most programming languages; mathematical ideas can be explored by experimenting with the code. This workshop gives participants the experience of making a mathematical artwork, a piece of embroidery reflecting their own explorations.
Introduction
Turtle Geometry, as a simple yet powerful metaphor, was introduced in 1969 two years after Logo [11] was invented as the first programming language for children. Imagine a turtle with a pen under its belly which can be set in modes up and down. Instructing the turtle to move and turn, creates drawings, first on screen, later on paper (see [6] for a very early physical turtle in action).
Machine embroidery is even older: the relevant Wikipedia page [12] mentions Tajima 1964 as the starting point. It took several decades for these machines to be available as consumer machines that could be controlled from a personal computer. Tens of different brands of machines use tens of different formats for the files used to instruct the machines.
Figure 1: The TurtleStitch environment, with program pieces to the left, programming area in the middle and output to the right.
van Montfort, Millwood, and Low
TurtleStitch [8] combines drawing and stitching by offering the option to export the Turtle Art as a file, readable by embroidery machines. The extra option to export as scalable vector graphics (SVG) opens connections to other ways of fabrication, e.g. laser cutter. An example of the TurtleStitch programing environment is shown in Figure 1.
Vienna based artist Andrea Mayr-Stalder started using these embroidery machines in artistic ways from 2008 onwards. For a video of a performance: see [14]. From 2014 onwards, the project was redeveloped as an educational tool [13] and revealed to the world in 2015 during a master class at Waag Society, Amsterdam.
Mathematics
Below are mathematical concepts we came across in the TurtleStitch community. They show very different ways to create mathematical inspired drawings that can be embroidered. The results can be both aesthetically pleasing and intellectually inviting. Either way embroidery is a way to communicate mathematical ideas.
(a) Kolam
(b) Hilbert Curve
(c) Tree
Figure 2: Some examples of designs made with TurtleStitch
Kolam
At CMSC 2024 we learned about Indian efforts [7] to use the culture of drawing Kolams for use in math education. It inspired us to make a lesson plan to explore these patterns with the ambition to stitch them. Figure 2a shows an example.
Szpakowski
The work of Polish architect Waclaw Szpakowski during the first half of the twentieth century, his so called Rhythmical Lines [1], only reached an audience after his death. Decoding the mathematical rules controlling these lines can be a joy, Figure 8 shows the stitching of such a line.
Superellipse
The generalisation of an ellipse to a superellipse [10] or even Gielis’s superformula [2] opens a huge family of mathematical curves. See Figure 8, to the right for some nested superellipses.
Recreating Computer Art
In 1965, scientists in Stuttgart, Germany hosted the first exhibition on computer art. Machinery and languages used to make these artworks are hard to find in working condition. Joachim Wedekind is saving these works by exploring how to recode them in Snap!, the language from which TurtleStitch was derived [9]. Many of
TurtleStitch: Exploring Shapes and Curves with Coded Embroidery
these works can be embroidered.
Recursion
The Dragon Curve (Figure 9), Koch Snowflake (Figure 3) and Hilbert Curve (Figure 2b) are just a few examples of compact code resulting in interesting designs.
Figure 3: Embroidery of concentric Koch snowflakes. Backlight emphasises the stitching points.
Embroidering natural forms
Trees (Figure 2c), flowers, snow flakes and more incorporate ideas on symmetry, recursion and Fibonacci numbers.
Lissajous
Yet another curve that is fun to explore parametric functions and see stitched by a machine.
Figure 4: A Lissajous function controlled by sliders on screen
Workshop
The workshop is divided in three parts. In the first 15 minutes the programming environment is explained as well as two mathematical concepts in the context of TurtleStitch. The participants then have an hour for exploration on their own. Handouts are available and can be downloaded from the TurtleStitch website [8]. The last 15 minutes is for a show and tell.
van Montfort, Millwood, and Low
Getting started
The TurtleStitch website has several resources to learn the basics of the working environment. We use cards designed by Jadga Hügle which can be downloaded from [3]. At the workshop we provide sets of these cards. Five minutes is taken to introduce the working environment as shown in Figure 1. Participants can code along on their own laptop. Free registration at the TurtleStitch website makes it easy to save and share work.
Figure 5: A sample card introducing the TurtleStitch environment.
Abstraction and generalisation
The idea to name procedures, that is to extend the programming language with new words is a powerful technique enabling more complex programming while keeping control. We take five minutes to explain how in TurtleStitch extra blocks are created and how input parameters facilitate generalisation.
Figure 6: Abstracting details into procedures, generalised with parameters.
TurtleStitch: Exploring Shapes and Curves with Coded Embroidery
Recursion
The next five minutes is used to show how the mathematical concept recursion can be used to re-create the spiral design shown in figure 1. We create a procedure (a new block) called line with parameters size and angle. Calling the block three times with parameters 100 and 120 will draw a triangle with sides of 100 pixels or when embroidered. The block can be made recursive by calling itself in its definition. Reducing the length at each call will introduce a spiralling effect. Without a base case the program will run forever. We’ll introduce a test to make the program stop when that condition is reached.
Figure 7: Triangular spiral from first page recoded recursively, based on [4]
Technical
As TurtleStitch runs in the browser, the only thing participants need is a laptop or tablet with an internet connection, although it can be installed for offline use. Materials needed to stitch the designs on embroidery machines are fabric and thread. The embroidery machines used during the workshop are single thread consumer machines for sale at around a thousand dollars. We do not encourage buying such a machine privately. We do encourage schools, libraries and maker spaces to buy such a machine for public use. It’s perfectly possible to use TurtleStitch without having access to an embroidery machine. We’ve learned from several users that they print their design on paper and then use that for embroidery by hand by framing the print with fabric in an embroidery ring.
Figure 8: Embroidering bookmarks with superellipses and Szpakowski’s A1 (1930).
van Montfort, Millwood, and Low
Figure 9: Embroidered Dragon Curve.
References
[1] S. Cowan. “Rhythmical Lines.” In Paris Review February 15, 2017 https://www.theparisreview.org/blog/2017/02/15/rhythmical-lines/. [2] J. Gielis. “A Generic Geometric Transformation that Unifies a Wide Range of Natural and Abstract Shapes”. Amer. J. Botany, vol. 90, no. 3, pp. 333-338, 2003. [3] J. Hugle. TurtleStitch Manual Cards, 2024 https://make.turtlestitch.org/2024/11/08/new-2024-manual-cards/. [4] M. Low. Pattern To Code https://www.warwick.ac.uk/turtlestitch/patterntocode. [5] S. Klimczak and C. Solomon. TurtleStitching: At Least 20 Things to Do with a Computer and a Computerized Embroidery Machine. 2022 https://logothings.github.io/logothings/documents/turtlestitching_%2020%20things%203%2012%2022.pdf. [6] S. Papert and C. Solomon. “Twenty things to do with a computer” MIT Artificial Intelligence Memo, no. 248, 1971 https://dspace.mit.edu/bitstream/handle/1721.1/5836/AIM-248.pdf?sequence=2 [7] R. Thamburaj, K. Desikachari and G. Thomas. 2025. “Tactile Kolam Patterns - Communicating Art and Mathematics to Students with Vision Impairments”. In: Fernau, H., Schwank, I., Staub, J. (eds) Creative Mathematical Sciences Communication. CMSC 2024. Lecture Notes in Computer Science, vol. 15229. Springer, Cham. pp 66-73. https://doi.org/10.1007/978-3-031-73257-7_5 [8] TurtleStitch, 2015-2025 https://turtlestitch.org. [9] J. Wedekind. Codierte Kunst, 2018 http://digitalart.joachim-wedekind.de/ueber-das-buch/ [10] E. W. Weisstein. “Superellipse.” From MathWorld-A Wolfram Web Resource. https://mathworld.wolfram.com/Superellipse. [11] Wikipedia. Logo https://en.wikipedia.org/wiki/Logo_(programming_language). [12] Wikipedia. Machine embroidery. https://en.wikipedia.org/wiki/Machine_embroidery [13] Wikipedia. TurtleStitch. https://en.wikipedia.org/wiki/Turtlestitch [14] Youtube (user chmod1234). Stitch Performance https://www.youtube.com/watch?v=RQ1tIlyy5JY