Software to create your own Knit-like string pictures.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
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 :)
Since I get some questions about the settings from time to time I thought I'd explain them a bit better:
Radius:
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.
Hooks:
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.
Lines:
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.
Contrast:
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.
Scale:
Zoom in and out of the picture with 1 & 2.
Offset:
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.
Create an account to leave a comment. Already have an account? Log In.
It wouldn't be too difficult to do, but I'm not planning on investing much more time in this project
I've tried squares, but they don't look . At least in simulation. You get some weird "interference" patterns. It also looks more geometric/blocky, instead of the more organic results you get with circles. Same for hexagons, though not that extreme. Circles tent to look the best, somehow.
Here's my semi-finished online "knitter": https://gerben.algemeenbekend.nl/threadtone/
Where you can select multiple shapes.
@Gerben Wow that's really interesting!
As far as I can tell the main problem with squares / hexagons / etc is that there will never be a jump to a hook on the same edge, which severly limits the number of options for a jump, on a square you get 25% fewer hooks as an availlable target.
The second problem that I can see is that the diagonals will always have the highest weight / priority, since there will be the most pixels between them, which causes them to be favored over other hooks.
Maybe one way to partialy fix these problems would be to only use a circular image, even when you have a square frame?
@Raphael Schaaf No sure if that first one is really a big issue.
As to the second problem you mentioned. On a circle, lines to the direct opposite are preferred to more diagonal lines, as those lines are shorter. I've experimented a bit with dividing the total number of black pixels on a line, by the length of the line, to negate this effect.
The downside was that the algorithm then preferred very short lines. I think I added a minimum length or something, which had the funny side-effect of creating a second circle, a fixed offset from the edge. I think that's where I stopped, as other projects got priority.
Never really finished it. It seems pretty much everyone only does the software side of this project. I've only seen 2 projects with finished string-art.
PS I even made a page, that would speak the number of the nail that was next, so all I needed to do was press "next", an listen where to go next. (-:
I was so fascinated by your pictures, that I did an app for Android which does the same. Reason: I have no windows... (hope that my 2012 iMac dies soon to be able to purchase a windows machine again)
BUT! The power of a tablet of smart phone is so little, that it takes decades to calculate... My "longest" try was with 50 strings and it took 5min! :-( So I abandoned this.
But my question (as I didn't got as far to be able to test it myself): You check the darkest connection from a certain point to all other points. The darkest is taken. What do you make next? Do you just go to the next point and do the same calculation (this is the way I did it)? Or do you have another system how to pick the next point to check the next connection?
Hi, that's cool, what did you program the app in?
You're right, the point you arrive at is taken as the new starting point for the next check.
It's a very time consuming calculation, if you are able to use the GPU it could probably run much faster...
So, please don't block me immediately when I tell you how I programmed it... It's on "ai app inventor". I am trying to work with Visual Studio, but it's quite a hard start as a newbie... One day... who knows :-)
I'm for sure disappointed on the functionalities of this software (usually I work with Arduino, and even the Arduino IDE is better!) and the programming by moving blocks...
I have modified the app and I have shared it on the appinventor website: ai2.appinventor.mit.edu/?galleryId=5560843821514752
Anybody who has ideas/suggestions how to improve the code is very welcome to let me know! Thanks in advance!
That's cool, I started programming with the block functions in Game Maker :D
I still use Game Maker to this day, even for this project, but nowadays I use the built in scripting language :)
Awesome superb program.. I am in fabrication of DIY embroidery machine.. All I want to get X-Y coordinate and connecting string numbers .. It will be really awesome to embroidered such patterns...
Nice, but you will probably need a piece of software to convert the instruction file to something that your embroidery machine understands :)
Dear Raphael, in the past i wrote an embroidery program that convert DST Tajima file format into simple G&M code. You can see in the following video.
I just need your help in this... end coordinates of connecting lines...
https://www.youtube.com/watch?v=5IKwKiq_b7w
Can I load the exported file into cura and print it with a 3D printer?
No idea what cura is capable of, but I highly doubt it...
Hi, I can do that, probably in a log sometime this week...
I've compiled this for linux, using the YYC for greater speed and it runs, BUT space does not bring up the dialog. It wont work because this:
and it says this about it:
"NOTE: This function is only valid on the Windows and macOS targets"
You might need to revisit this for linux compatibility, because this is a blocker for linux people.
I faked it by commenting this line and and linking straight to the file
//f = get_open_filename("image file|*.png;*.jpg;*.jpeg", "")
f = working_directory + 'template.jpg'
Which you can replace in the assets folder 'template.jpg' gets loaded when you tap space, instead.
I will have more time to fiddle with this (and provide linux executables) in a couple days.
Found another issue: the same technique is used to save the file upon pressing S. This wont work on linux either, unfortunately.
Perhaps upload it like this?
Oh, I didn't know get_open_file() was windows only...
Let me know if I can help you with this :)
Maybe take a look at this:
https://forum.yoyogames.com/index.php?threads/file-manager-for-windows-and-ubuntu.28061/
Hi, Awesome project! But I have problem with the step exporting generated image. Instead of a jpg file is saved after pressing S but a .ini file. What should I do? Thanks!
Any chance of getting a Mac or Linux version of this algorithm?
I wrote this program in GameMaker Studio, and there seems to be an export function for Ubuntu and Mac. I can give it a try...
No, sorry, I just checked and I don't have the necessary licences to export for Linux and Mac...
I uploaded the source code to the Google drive, so if anybody has the necessary GameMaker Studio licences they could export the program for me.
I hope someone out there can help. Kudos on a nice project!
Are you using the original GameMaker Studio? If so I have the Mac License.
Yes I am, GameMaker Studio 1 or whatever you wanna call it :)
I have found some issues and i'm building one, see comments above.
having some problems but most likely my Win7Starter. When data is saved, where is it stored. The Instructor crashed my whole system the first time but loaded on the second try. I really want to get this working as it is neat as heck :-)
Oh, that doesn't sound very good...
I tested it on a couple of different PCs and had no problems...
After you run an image through the generator you hit S and can choose the location where you want to save the data.
If you have problems with the generator I recommend reducing the number of lines, hooks and the radius to smaller numbers (~50), just to see if it works at all.
The higher those numbers are, the longer it takes to calculate.
Thanks Raphael for the input. I will try again later this evening :-)
Here is the actual issue ( I think ). The Instruction program is working as your Test INI file works well... However when a file is loaded into the Generator then there is no action when selecting the Save option. I have reduced all the variables and the program just continues to cycle through the Fps line in the upper left.
trying this out myself, thanks for this! the instructor will be fantastic to use to create my own IRL
Cool, please send me a picture when you're done :)
I have yet to make one myself...
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.
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...
Become a member to follow this project and never miss any updates
Rafael, Do you have plans to create the DIY knit for a square shaped knit?