Parameters cheatsheet¶
Here’s a complete list of the parameters you can set from python or the CLI. Notice that for the CLI you can either use the short form (e.g. -i) or the long form (e.g. --input) for the parameter names.
More details are available in the docs, or in the webapp’s help section (along with some tips to ensure good visual quality).
Parameter (API) |
CLI flag |
Type |
Default |
Description |
|---|---|---|---|---|
|
|
str (path) |
Required |
Path to input image ( |
|
|
int |
Required |
Number of nails on the border. More nails = higher detail but slower. Try increasing it by ~50-100 if circular ring artifacts appear with |
|
|
float |
Required |
Rescales image before processing to use a lower internal resolution → speed up computations. Lower → faster, coarser; higher → slower, sharper. Recommended: choose a value that causes your pic to go down to ~300-700px per side. Typical values: 0.25-0.5 (to halve or more pic size). Try increasing this if output visual quality is too low or if the algorithm stops too early compared to the input |
|
|
float |
0.1 |
How much each line darkens the canvas. Higher → darker, thicker effect. Recommended: increase this if final image appears too white/empty, decrease if too dark/filled in. Typical values: 0.1-0.25 (don’t go too much higher than this or the output will be a black mess). |
|
|
int |
5000 |
Maximum number of strings/iterations. Larger = more detail, slower. Early stopping may stop earlier. |
|
|
str |
|
Nail arrangement: |
|
|
bool flag |
True (API), False (CLI) |
Cache line computations for speed. Recommended: disable caching only for debugging, i.e. always use the default values, unless you really want |
|
|
bool flag |
True (API), False (CLI) |
Precompute all line paths before starting (much faster at runtime, uses more memory). Recommended: leave precaching on, i.e. always use the default values, unless you really want |
|
|
float |
π/8 (≈0.39) |
Circle layout only. Minimum angular spacing (radians) between consecutive nails to avoid redundant/parallel lines. |
|
|
tuple[int,int,int] |
(50, 50, 50) |
RGB color (0–255). Used to replace transparency in PNGs. |
|
|
int |
20 |
Early stopping patience: number of stagnant iterations before halting. |
|
|
float |
1e-6 |
Early stopping tolerance: minimum error improvement considered significant. |
(output path) |
|
str (path) |
None |
Where to save the generated image. Folder or file. Extensions: |
(string order) |
|
str (path) |
None |
Save nail sequence to file ( |
(distance vec) |
|
str (path) |
None |
Save error progression to file ( |