Botanica Mathematica

a textile taxonomy of mathematical plant forms


Chaotic knitting

In mathematics, a chaotic system is one which has clear rules on what to do from one time step to the next, but where the outcome is unpredictable because it is so sensitive to the starting conditions.  Amazingly, we can make up a very simple knitting pattern which is complete chaos…

Let me give you the general idea before I get into specifics. There are two colours. You start with a row consisting of the colours chosen in a random order. Then in subsequent rows, the colour of a stitch depends on the colours of the three stitches below it. (That is, the one directly below and the ones either side of that stitch.) If you’re at an edge stitch, you need to look at the stitches at the other end of the row – imagine they wrap around in a circle.

The specific rule I chose is the following. Let W=white yarn, O=orange yarn.

Stitch pattern below New stitch colour

This is called ‘Rule 30’ and you can read more about it on Wikipedia.Not all rules are chaotic, but this one is. If you change the colour of even just one stitch in the starting row, you’ll get a completely different pattern.

Here’s the pattern I made:

cellular automata knitting - rule 30The first thing you’ll notice is all the triangles that appear. That was unexpected. There are also some straight lines on the right. But it’s all very random.

This way of creating patterns is known mathematically as a “one dimensional binary cellular automaton”. It is one-dimensional because it only relies on the stitches immediately below it, and not all the other ones around it. Wikipedia has a lot of information about more general cellular automata if you are interested!

One of the amazing things about Rule 30 is that it appears in nature too. There is a particular species of sea snail, called Conus textile, which shows up a very similar pattern on its shell.

Conus textile shellNotice the triangles appearing as well as regions of straight lines. Amazing!

Try experimenting with different rules, different colours or even different numbers of colours and show us what you find! (I recommend coding up the pattern in Excel if you can – it makes it much easier to knit. If you’d like a copy of my spreadsheet, send me an email at


Introduction to L-systems

The Botanica Mathematica project is about using simple mathematical rules to generate pieces of knitting or crochet. If the rule involves choosing what to do based on what you have already done, then you will be making an L-system. Madeleine has already written a post with a simple example, and in this post I want to elaborate on it some more.

Continue reading