Message Boards Message Boards

String art: 360 tacks spaced evenly around a circle

enter image description here

In the United States from the late 1960s to the early 1970s there was a fad for making string art. In basement workshops and garages all over the country, amateur artists whiled away their free time stringing colorful bits of yarn between little tacks hammered into felt-covered plywood. The resulting artwork looked vaguely mathematical, and I recall that a photograph of one such piece graced the cover of my seventh grade mathematics textbook.

For this post, imagine 360 tacks spaced evenly around a circle. Beginning at the top (i.e., the 12:00 position) label the tacks from 0 to 359 proceeding clockwise. Choose a constant m. Then, for points i = 0 to 359, draw a line (or string a piece of yarn if you wish) between tack i and tack (i m) mod 360.

Different values of m produce different patterns, but allowing m to vary smoothly between 1 and 360 produces a psychedelic effect that might have inspired Dr. Timothy Leary back in the day.

The Mathematica code is very simple:

base = 360;
max = 359;
plist = {Sin[(2.*Pi*#/base)], Cos[2.*Pi*#/base]} & /@ 
   Range[0, base - 1];
colors = Table[Hue[x], {x, 0, 1, 1./base}];
zlist[p_, m_] := 
 Table[{p[[i + 1]], p[[Mod[IntegerPart[m*i], base] + 1]]}, {i, 
   base - 1}]
stringArt = 
 Animate[Graphics[{colors[[IntegerPart[m]]], 
    Line[zlist[plist, m]]}], {m, 1.1, base - 0.1, 0.1}, 
  AnimationRate -> 3, AnimationRunning -> True, 
  AnimationDirection -> Forward, AnimationRate -> .1]

The gif doesn't really do it justice; to get the full effect I suggest you run the code in your own copy of Mathematica.

POSTED BY: John Shonder
6 Replies

Thanks for the recommendation. What a great channel. I spent several hours last night watching the videos.

POSTED BY: John Shonder
Posted 1 year ago

For people interested in treating (epi/hypo)trochoids as line envelopes, there are nice papers on this subject by Simoson and Quenell, among others. Simoson's treatment, in particular, suggests modifying the original code by John to a 3D version, given below:

base = 360; max = 359;
plist = {Sin[(2.*Pi*#/base)], Cos[2.*Pi*#/base]} & /@ Range[0, base - 1];
colors = Table[ColorData["BalancedHue", x], {x, 0, 1, 1./base}];

zlist[p_, m_] := Table[{Append[p[[i + 1]], 0],
                        Append[p[[Mod[IntegerPart[m*i], base] + 1]], 1]},
                       {i, base - 1}]

Manipulate[Graphics3D[{{Directive[EdgeForm[Directive[Black, Opacity[1/2]]], 
                                  FaceForm[]], Cylinder[{{0, 0, 0}, {0, 0, 1}}]},
                       {Directive[AbsoluteThickness[1/2], colors[[IntegerPart[m]]]], 
                        Line[zlist[plist, m]]}}, Boxed -> False],
           {m, 1.1, base - 0.1, 0.1}, SaveDefinitions -> True]

Manipulate screenshot

POSTED BY: J. M.

Here is a nice related Mathologer explanation.

POSTED BY: Henrik Schachner

I would follow John's advice and run the code on the desktop, my jaw dropped!
Thank you @John Shonder for sharing :)

POSTED BY: Ahmed Elbanna

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team

Where is that tie-dyed shirt I used to love?

Nice Job!

POSTED BY: A J Hardesty
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract