String Art Generator
Turn a picture into a string-art plan: nails around a circle, one thread at a time, chosen by the darkness it covers, with the thread length reported.
How the string art is planned
The picture is reduced to a 480-pixel square and read as brightness. Nails are placed evenly on a circle inside the board, and the tool repeatedly picks the thread that covers the most remaining brightness, starting from the nail the previous thread ended on. After each segment the covered area is dimmed, so the search moves on instead of re-tracing the same line.
You get the rendered board and the length of thread it used, in metres, assuming a 60-centimetre board. More segments means a denser picture and more thread; fewer segments gives the sparse, geometric look string art is known for.
How to use it
Choose a picture, set the nail count and the number of segments, and press Run. Start around 180 nails and 3000 segments; raise the segments for detail, lower them for a cleaner pattern.
Why this runs on the server
The search evaluates every candidate nail for every segment, which is a numeric loop rather than a pixel edit. It runs as a skill so the browser stays responsive and the same input always produces the same board.
Upload a picture and the page plans a single continuous thread path between nails on a circle, renders the board, and reports how many metres of thread the path needs on a 60 cm frame.
The planner resizes the picture to 480 by 480, places between 60 and 360 nails on a circle, and chooses each next segment greedily: it scores every legal segment by how much of the bright part of the picture it covers, draws the best one, and dims that area so the next step looks elsewhere. It never backtracks.
The result is reproducible. The same picture, nail count and segment count produce the same path, because the only random element is absent and ties are broken by the lower nail index, not by a draw.
The options and their bounds
Nails range from 60 to 360, segments from 500 to 8000, and thread width from one to four pixels. A board also caps the segment count at nails times sixty, so a 60-nail board refuses a request for 5,000 segments and names both the request and the ceiling.
The picture may be up to 25 MB. Board and thread colours are six-digit hex, and the rendered file is a PNG named string-art.png. The summary reports the nail count, the segment count and the thread length in metres.
- Nails: 60 to 360, default 180
- Segments: 500 to 8000, also capped at nails times 60
- Thread width: 1 to 4 pixels
What the rendered board means
The thread is the bright element on a dark board, so bright areas of the picture attract many crossings and black areas stay dark. That is the inverse of classic dark-thread string art, where the thread adds darkness; a picture with a light subject on a dark background suits this planner.
The length figure is the sum of every chosen segment on a board where 480 pixels equal 0.60 m. It is the length of one continuous path, not the number of strands, so it is the figure to buy thread against rather than a stitch count.
How to use the board options
Upload the picture, then set the nail count from 60 to 360, the segment count from 500 to 8000, the thread width from one to four pixels, and the two board colours as six-digit hex. Keep segments at or under nails times sixty, or the page refuses the run and names the ceiling.
Press Run and read the summary with the rendered board: nail count, segment count and the thread length in metres for the 60 cm frame. The same picture with the same settings always draws the same path, so a second run is a check rather than a new design.
What to Expect
Best for
- Turning a portrait or a silhouette into a thread plan
- Getting a reproducible path for a physical board
- Estimating how much thread a design needs
Not ideal for
- A photorealistic result, since the path is a greedy approximation
- A picture with fine detail at 480 pixels
- A board with more nails or segments than the schema allows
What this tool keeps
- The same path for the same picture and settings
- A single continuous route between nails
- The rendered PNG and the metre estimate for the chosen board
What may need cleanup
- The greedy path, which can leave a bright area under-served
- The thread estimate, which assumes the stated 60 cm board
- Colour choice, which the planner does not optimise
Common errors
- Asking for more segments than nails times sixty and reading the refusal as a failure
- Expecting a second run with the same settings to differ
- Using a dark subject on a light background and getting a mostly empty board
Example use cases
- Planning a physical string-art portrait
- A generative-art exercise
- Estimating thread for a workshop
Sample input
A 1200-pixel portrait uploaded with 180 nails, 3000 segments and a one-pixel white thread on the default board.
Sample output
A 480-pixel PNG board with the thread path drawn, and a summary reporting 180 nails, 3000 segments and the thread length in metres.
Who this is for
- Crafters planning a board
- Generative-art hobbyists
- Teachers running a string-art workshop
Frequently asked questions
What does the string art generator plan?
A single continuous thread path between nails on a circle from an uploaded picture, rendered as a board with an estimate of the thread length on a 60 cm frame.
Is the result photorealistic?
No. The path is a greedy approximation, so a bright area can be under-served.
Does it produce a reusable pattern file?
No. It renders the board PNG and reports the metre estimate, which is the whole output.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.