knitter is an open software to generate a circular/rectangular knitting pattern from a picture.
The method is inspired by the work of Petros Vrellis.
- Mona Lisa by Anwer Al-Chalabi
- Dog portrait by Wtfacoconut
- Similar algorithm using Qt/C++ by MaloDrougard (also includes an interesting report on the topic)
- ArtRapid web app and store. Can create circular knitting patterns for free and purchase physical artworks.
- Stringading shop. German manufacturer offering free preview and purchase of physical artworks.
- Clone the repository (or just download knitter.pde)
- Copy your grayscale image into the same folder as the
knitter.pde
and name itimage.jpg
. Make sure your image is square if you want to use modes CIRCLE or SQUARE, otherwise your picture will be distorted. - Open
knitter.pde
with the Processing IDE. - Modify the configuration parameters at the top of the file (optional). You can also choose between CIRCLE, SQUARE and RECTANGLE mode here.
- Run Sketch.
- Find the best parameters using the sliders.
While running the Sketch, a simulated result is shown in the window.
The knitting order is saved to instruction.txt
.
String #1454 -> next pin: 84
String #1455 -> next pin: 122
String #1456 -> next pin: 154
String #1457 -> next pin: 128
String #1458 -> next pin: 80
String #1459 -> next pin: 14
String #1460 -> next pin: 83
Furthermore, an interactive HTML page displaying and reading the single steps is generated and saved to instruction.html
.
The pins are numbered counter-clockwise starting from 0:
To have an estimate how much thread is needed, the total length is printed to the console in the end.
Total thread length: 1543 m
An example result of running the current algorithm: