DIY Knit Portrait

Software to create your own Knit-like string pictures.

Public Chat
Similar projects worth following
I created 2 programs that lets you make your own "Knit" pictures. Based on the description of how the algorithm for the original Knit pictures works, I created my own algorithm that takes an image and converts it into a string picture.
Knit_Generator.exe can convert images to string pictures and exports the instructions.
Knit_Instructor.exe can open the instructions and tells you how to string the frame.

Download here:

Here's the page of Petros Vrellis, the artists that first used this method (to my knowledge):
  • Finished my first portrait!

    Raphael Schaaf12/15/2020 at 23:31 4 comments

    I finally finished my first portrait!

    And as any great artist has to have one, I decided to make a self portrait ;D

    Here are some pictures of what it looked like in the software and the finished product:

    I'm quite happy with how it turned out :)

    Some notes:

    The wooden ring is not strong enough for 3000+ lines of string, it gets slightly distorted into a "pringles" shape. This might cause a loss in details. A second ring glued to it might help with that.

    The picture can't be hung directly on the wall, as not enough light passes through it and there wouldn't be sufficient contrast between the string and the background, making the image too dark. A backlight would help with this, but I just hung it from the ceiling, about 20cm from the wall.

    It turned out slightly darker than in the software, keep that in mind if you try your hand at one of these string portraits :)

  • Settings explained

    Raphael Schaaf11/11/2019 at 22:28 1 comment

    Since I get some questions about the settings from time to time I thought I'd explain them a bit better:


    The radius of the circle in pixels. Does not have any connection to how large you want to make the actual portrait. A bigger radius will make a more precise portrait, but will also take longer to compute. Use a small radius for quick previews and a bigger one when creating the final instructions for your portrait.


    The number of hooks or nails you will use. More hooks make for nicer portraits with less geometric artifacts, but take longer to compute. Keep in mind how close together you can fit the hooks/nails.


    The number of lines that will be drawn between the hooks. Good values generaly between 2000-3000. When the generating process is near its end and all the new lines are placed around the border of the ring you have too many lines. When they are still being placed through the ring you have to few lines. Try to find a good balance.


    The most tricky one to figure out. Basically the value that gets subtracted from every pixel when a line passes through it. A higher value should be used for thicker threads or smaller portraits. 20-50 seems to work fine.


    Zoom in and out of the picture with 1 & 2.


    Move the picture with the arrow keys.

    Detailled view:

    To open & close a more detailled view of what is going on during the generating process press D. This will show all the lines calculated so far and the remainder of the source image. Will slow down the calculation imensely, so don't leave it open.

View all 2 project logs

  • 1
    How to use Knit_Generator
    1. Open Knit_Generator.exe.
    2. Press Space to load an image (.png, .jpg, .bmp should work).
    3. Position the part of the image you want converted inside the circle using the arrow keys to move it and 1 & 2 to scale it.
    4. Set the number of hooks, radius of the circle (bigger = more accurate but slower calculation), number of lines and contrast (contrast is inverse, higher number will create a flatter image).
    5. Press Enter to start the calculation (takes a couple of seconds to initalize).
    6. Pressing D during the calculation switches the drawing of the lines on and off. Can be used as a preview, but will slow down the calculations extremely if left on.
    7. When finished, press S to export the generated image as an .ini file containing the instructions for assembly.
  • 2
    How to use Knit_Instructor
    1. Open Knit_Instructor.exe.
    2. Press O to open a previously generted ini file.
    3. A single line will be displayed at a time, with the instructions from and to which hook to connect the string.
    4. Cycle through the steps with Enter and Backspace.
    5. Use J if you want to jump to a specific step.
    6. Use T to toggle the Image on and off.

View all instructions

Enjoy this project?



Dr. Cockroach wrote 04/13/2018 at 16:40 point

Whoa is right, This is really something to try :-)

  Are you sure? yes | no

Mike Szczys wrote 04/13/2018 at 16:33 point

Whoa! I love this. That string art was fascinating when we covered in on Hackaday a couple of years back. It's really cool that you implemented an algorithm for this and the sample images look fantastic! Well done.

  Are you sure? yes | no

Raphael Schaaf wrote 04/17/2018 at 11:18 point

Thanks for the compliments :)

The base image used really makes or brakes the end result.

I tried a bunch of variants for the algorithm, but surprisingly the results mostly looked the same...

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates