Back to all articles
Algorithms 7 min read June 18, 2026

Geometric Curves vs. Portrait Reconstructions in String Art

Understanding the mathematical divide between parametric equations and greedy optimization models.

D
Dr. Julian Vance
Computational Artist & Mathematician

In the realm of computer-generated string art, designs generally fall into two categories: pure geometric patterns based on math formulas, and photo portraits calculated using image optimization loops. While both are wound on circular boards, their core programming paradigms represent completely different branches of mathematics.

1. Parametric Curves and Modular Multiplication

Geometric string art relies on modular arithmetic to establish connection guidelines. The nails are numbered from 0 to N-1. To generate a curve, the algorithm applies a multiplier (M) to each nail index (i) and draws a line to the resulting index modulo N. This formula is written as: f(i) = (i * M) mod N.

Depending on the multiplier value chosen, beautiful geometric curves emerge along the chord intersections:

  • M = 2 (Cardioid): A heart-shaped envelope curve containing a single cusp.
  • M = 3 (Nephroid): A kidney-shaped curve with two cusps.
  • M = 4 (Trifolium): A three-cusped geometric envelope resembling a leaf.
  • Hypotrochoids: Generated by rolling a small circle inside a larger boundary circle, creating complex multi-pointed stars.

2. Image Reconstruction via Linear Optimization

In contrast, portrait generators like Stringify do not follow pre-set mathematical equations. Instead, they use a raster image as their target goal and calculate paths dynamically. The generator does not know what shapes it is drawing; it only knows how to minimize color discrepancies in a grayscale pixel buffer.

Because portrait generation requires fitting lines to arbitrary shades, it is solved using iterative feedback. In math terms, this is a linear approximation problem. By drawing a line and subtracting its darkness from the image, we guide subsequent lines to other dark coordinates.

While geometric string art is predictable and symmetrical, portrait optimization is highly complex. The final sequence list of 3,000 steps is chaotic and has no repeating modular cycle.

Try Creating Your Own Pattern

Put these principles into action with our 100% free string art generator.

Open Generator Tool

Related Articles & Guides

Algorithms

The Mathematics and Algorithms of Circular String Art

Discover the mathematical engine powering digital string art. Learn how raster image analysis, chord...

Materials Guide

Choosing the Perfect Board, Nails, and Thread for String Art

Learn how to select the right wood species, metal wire nail configurations, and sewing thread weight...