Sierpinski Felted Slippers and Algorithmic Knitting

IMG_5585This winter I decided to knit Ari some slippers, and told him that I would do the knitting if he would think up the mathematical concept (because you can’t knit non-mathematical garments for a mathematician). Our collaboration was fruitful and produced these awesome slippers.

There are TWO elements of these slippers that make them mathematically interesting.

  1. I did not use a pattern or a chart for the triangle but followed a recursive rule, or algorithm and the pattern magically emerged! (See details below)
  2. The pattern that magically emerged is a famous fractal pattern known as a Sierpinski triangle.

IMG_5581

I used my usual felt clog pattern, which is worked from the toe back and forth up to the cuff, picking up stitches along the edge of the cuff as you go. The top of the slipper becomes a nice canvas to do any pattern work, but it’s important to keep in mind that the pattern will shrink and squish together during felting.

Ari gave me these instructions: “Start with one white stitch in the center of the first blue row, and knit back and forth using the following rule. If the last stitch you knitted into is the same as the one you are about to knit into, make it blue. If the last stitch you knitted into is different than the one you are about to knit into, make it white.” 

I blindly followed this rule, and the Sierpinski triangle began to emerge. How cool is that?? (Sidenote: see the wikipedia article to see all the amazing ways that different processes can generate a Sierpinski triangle!)

As the slippers got going, Ari became interested in the idea of generating knitting patterns algorithmically and wanted to try it too, so he knit this:

IMG_5610.jpg

Then he realized that it’s more efficient to use a computer program to play around with different ways of generating patterns than actually knitting, so he spent an afternoon writing a computer program in Python and exploring what happens when you try other things. For example:

  • What happens when you use three colors?
  • Does the number of stitches matter?
  • Does it change things to knit back and forth versus circular?

The following was written by guest blogger, knitter, programmer, and mathematician Ari Herman. If you are intrigued by Ari’s mathematical and technological experiments, read on:

Ari says,

“The first picture uses the exact same rule used for the slippers, but with more rows and more stitches per row.”

Serpinski3

“This next one uses a slightly different rule, where you have to look at the colors of three earlier stitches.”

Serpinski8

“The next three are circular knitting patterns. What is cool is that they are all generated by exactly the same rule, the only different is the number of stitches per row. When that number is a power of 2, the pattern will look like the first picture. For other numbers, the patterns can get pretty crazy and chaotic! (See the second and third pictures below)”

Serpinski5Serpinski1Serpinksi2

“In all of these patterns white corresponds to 0 and red corresponds to 1.  To decide the color of a stitch, you look at earlier stitches and “add” their colors modulo 2. You can also do this with more colors, so that each color corresponds to an element of a finite group and you determine the color of each stitch from colors of previous stitches using the group operation. All of my experiments with more than two colors came out looking muddy.”

IMG_5587

Another winter and prolific knitting season has come and gone. Here’s to toasty toes and busy brains.

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s