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
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.
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.