String art generator

06/01/2022

This project began with the idea to build a square grid of n x n nails. Then a thread could be weaved between the nails. The thread is a continuous one, without breaks, and you can change the color in a palette of 5 by clicking or touching the screen.

The initial idea was to weave yourself interactively, then I thought an algorithm could be responsible of that. In the final version you can weave yourself in addition to the generated pattern anyways.

I had this idea because I remember when I was a child playing with a piece of wood with some nails on it and a wool thread, it was probably school homework, but I was fascinated by the mathematical forms that can emerge from this, and I don’t know why, but I think it’s somewhat related to coding in a computer. There are loops, coordinates, and you can create your own “algorithm” to weave the forms.

So I started with this basic idea, but then I realized that the complexity, diversity and beautiful images that can emerge from these can be improved if, instead of using a grid of nails, we use other layouts for the “nails”, for instance, spirals, circles, etc.

Probably because I’m used to work with pixels, the grid is the most familiar way to work, and so was the first layout in my mind, but I think the main benefit of string art is to break this paradigm and use other configurations.

So in my algorithm there are “layouts” of nails, and then “patterns” of threads. A pattern follows the instructions to weave between the nails. Each nail has its virtual coordinates that, not necessarily, correspond to the real coordinates in the bitmap.

Both the “Layout” and “Pattern” are the main features in the generative image/animation.

A “pattern” are the instructions that the thread has to follow to weave the result, for instance could be like… start with the first nail, go the to last one, back to the second nail, then to the second-last nail, etc. The thread is always continuous without interruptions, only color changes.

The same “pattern” applied to different layouts can display a completely different result. In a way is a distortion of the space that create totally diverse structures.

In the following example you can see the same pattern (which I called “frames”, in 4 different layouts, “grid”,”square”,”circle” and “triangle”

So, as I realized this, in the last weeks I spent most time working on both the layouts and patterns, and trying to improve them to make beautiful images. At the end I made 21 patterns and 10 different layouts!

This is the generative project for fx_hash I’ve spent the most time by far and it’s going to be dropped there as a huge collection.

Trying to look for other digital artists who had worked with string art I found the amazing work of Petros Vrellis with his “Computational String art” code to recreate images using string art in a circle configuration (one of the possible layouts in my definition)

You can find the source code on github (2016)

Did you know that String art in fact has its origins in the ‘curve stitch’ activities invented by Mary Everest Boole more than 100 years ago to make mathematical ideas more accessible to children? Of course it was in the pre-computer era, but so computer-ish, isn’t it?

https://en.wikipedia.org/wiki/Mary_Everest_Boole

If you’re interested you can still get a mint on the fxhash marketplace

To end this summary I’d like to show you some of the project variations in this video and some instructions about the controls.

Some samples
Controls

Comparteix: