Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 1.46 KB

README.md

File metadata and controls

39 lines (21 loc) · 1.46 KB

String art

Tool calculating how to recreate an input image as string art, that is, by arranging a single line of thread wound around a circle of nails.

The video that originally inspired this is not on the web anymore, but this more recent one is similar:

Making Hyperrealistic Portraits With A Single Thread

Usage:

python strings.py input-image.png output-prefix

The input image should be square-shaped.

The output is in output-prefix.png. There are two extra files showing intermediary steps of the computation: output-prefix-allow-negative.png shows the string art when both black and white strings are allowed. output-prefix-unquantized.png shows the string art when infinitely thin and long threads are allowed (but only white).

Example output:

Image with allow-negative:

Trump allow-negative

Image unquantized:

Trump unquantized

Final image, created from ~12000 arcs. Assuming a circle of diameter 1 meter, this is ~10 kilometers of thread:

Trump final

Don't try to be too cheap with the strings:

Bellucci, 15 quantization levels Bellucci, 5 quantization levels