SkillAgentSearch skills...

Stringart

A stringart generator written in Python

Install / Use

/learn @grvlbit/Stringart
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

string-art

string-art is an algorithm to construct string-art pictures.

Mona Lisa stringart

This project has been inspired by the magnificant works of Petros Vrellis.

Algorithm

The idea is to crop a picture to a given shape (e.g. circle) and then place a number of nails evenly spaced around that. Then based on a random nail the algorithm starts calculating the best route (that is the route with the highest darkness) to the next nail. This procedure is continued until a maximum number of iterations is reached or the simulated picture matches the input.

Usage

The general idea of how to use the module in your own scripts is presented in the __main__.py routine.

Notes

This is a relatively naive implementation. The problem scales with the number of nails, iterations as well as the resolution of the input.

  • Use cropped images roughly 300x300px
  • Works best with pictures with high contrast
  • Works best on portraits
View on GitHub
GitHub Stars29
CategoryDevelopment
Updated3mo ago
Forks11

Languages

Python

Security Score

87/100

Audited on Dec 24, 2025

No findings