Skip to content
Math Background Studioby GordonKit
Open Studio

String art

Straight lines only, yet their envelope is a smooth curve: parabolas, astroids and pursuit spirals.

Open String art in Studio

String art background example

Hammer two rows of nails into a board and join them pair by pair with thread: every thread is straight, yet together they outline a smooth curve. The curve that every line touches is called the envelope.

How the math works

kn − k√x + √y = 1
Two perpendicular edges are each divided into n parts, and point k on one is joined to point n − k on the other (one line is highlighted). Together the lines outline the dashed curve √x + √y = 1, which is part of a parabola.
Formula
Envelope of the corner parabolas
√x + √y = 1
Astroid (envelope of a sliding ladder)
x^(2/3) + y^(2/3) = 1
Pursuit: each corner moves t toward the next
Pᵢ → Pᵢ + t · (Pᵢ₊₁ − Pᵢ)

Corner parabolas: each line runs from (k / n, 0) to (0, 1 − k / n), so its two intercepts always add up to 1. The envelope of this family is √x + √y = 1, which turned 45° is a parabola.

Astroid: picture a ladder of fixed length sliding down a wall, and draw a line at every position. The envelope of all positions is x^(2/3) + y^(2/3) = 1; across the four quadrants it is a four-pointed star.

Pursuit polygon: every corner of a polygon moves a small fraction t toward the next corner, the new corners form a new polygon, and it repeats. The polygons shrink and turn, and the corners trace spirals winding into the center.

Parameters

Pattern
Which curve to draw: corner parabolas, an astroid or a pursuit polygon.
Corner parabolas · Astroid · Pursuit polygon
Tiles per short edge
How many tiles across the short side.
1 to 8
Lines
How many lines in each set. More lines make a smoother envelope.
6 to 60
Sides
Number of sides of the pursuit polygon.
3 to 8
Step ratio
The fraction t each corner moves per step. Smaller values pack the layers and wind the spiral tighter.
0.03 to 0.3
Line width
Line width, relative to the short side of the canvas.
0.0005 to 0.006
Blur
Overall blur, relative to the canvas short side. 0 means no blur; larger values soften the lines into a glow.
0 to 0.04

Examples

Each example opens in the studio with these settings.

Using it as a background

20 to 30 lines show the curve beautifully; with too many, the lines blur together and the charm of curves made from straight lines is lost.

Thin lines on a dark background look like real nail-and-thread art. Pursuit polygons with 4 or 6 sides and a gradient palette look the most three-dimensional.