GRASSHOPPER: Knitting patterns on a surface in Grasshopper
Knitting patterns on a surface in Grasshopper
This 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.
Source: Giulio Pia Centino