Knitting patterns on a surface in Grasshopper

Last week I have been visiting my brother in Barcelona. Maybe I should blame the maritime environment if I started experimenting with knots and threads. So, what I am going to show you today is a method to digitally knit yarn in Grasshopper. A similar definition to make a chaining fabric is provided at the end of the tutorial as well.
The stockinette stitch pattern

Download this Grasshopper definition
We are going to model the common stockinette stitch pattern at first, because this stitch can be easily adjusted to other knitting, chaining or weaving fabric compositions.
- The Grasshopper file starts from a straightforward definition of a knitting tile made out of curves, a surface and some parameters. This tile is illustrated in the picture above and is exactly the one marked in the dashed “component” box. The tile is surrounded by a rectangle in the grasshopper canvas, so that you can quickly adjust it to other definitions, in case you should need.
- A containing box is created, departing from the input curves. We are particularly lucky this time, because the open part of the curves can be exactely used to define the boundary box.
- This tile of curves is then repeated on the surface using the surface morphing component of Grasshopper, which is particularly useful because it maintains the geometrical continuity of what is being positioned.
- All curves are joined and rebuit using a custom-written C# method.
- The piping component finally produces the pipes.

Chaining pattern
By minimally modifying the previous definition, we can obtain a series of chains on a surface. It similarly works with one tile, which is then copied on the surface. We could expand this definition by making each newly formed link (a closed curve) periodic.



May 22nd, 2009 at 7:12 pm
wowow i wanna make the same for my shiny knights chainmail, this really rocks, thank you so very much for your good manual!!
June 12th, 2009 at 3:38 pm
hey my pleasure
August 11th, 2009 at 6:14 pm
oh wow, this is definition is deliciously elegant… I tried scripting a crochet pattern a few weeks ago but mine’s so primitive by comparison! Thanks so much for sharing
August 16th, 2009 at 9:31 am
nice one…
November 6th, 2009 at 2:33 am
That’s gorgeous. Thank you for sharing.
November 7th, 2009 at 12:10 am
Thanks a lot man. As Walter Sobchak once said, the beauty of it is in the simplicity.