String Art with Python

Published: 16 February 2021
on channel: Schattman Math
11,842
295

A gallery of computer-animated string art by Jason Schattman that can fold and twist on itself. Wait for the explosion at the end! :) I coded the animations in Python.

You can interact with the program on repl.it at https://repl.it/@schattj/String-Art#m.... Try creating your own designs by adjusting the skip-rates and the values of a and b.

The first circular web, which has 80 "nails", is made by stringing each nail to the one that's 20 nails away from it, counterclockwise. Thus, nail 1 connects to nail 21, nail 2 connects to nail 22, nail 3 to 23, and so on. This 20 is arbitrary. Skipping more than 20 results in a fatter web and a smaller circle in the middle. Skipping less than 20 results in a thinner web but a larger circle.

The crescent-moon web is made by stringing nail 1 to nail 2 (skipping 1 nail), then 2 to 4 (skipping 2 nails), then 3 to 6 (skipping 3), then 4 to 8 (skipping 4), etc. In other words, the number of nails being skipped increases by 1 with each new string.

To get the 3-knobbed web, the number of nails being skipped over by each new string increases by 3 each time: 1 to 2 (skipping 1), then 2 to 6 (skipping 4), then 3 to 10 (skipping 7), then 4 to 14 (skipping 10), etc.

A bit more detail for the mathematically inclined
*************************************************
The twisted-up webs that unwind into a circle in the second half of the video are made by interpolating between a given Lissajous curve parametrized by (sin at, sin bt) and the circle, parametrized by (cos t, sin t). For example, to get a a figure-8 curve, set a = 1 and b = 2, resulting in the parametric curve (sin 2t, sin t). 25% of the way through that animation, the curve being drawn is (0.75 sin 2t + 0.25 sin t, 0.75 sin t + 0.25 sin t), so that the curve is a 75-25 "mix" of a figure-8 and a circle. In the final figure (the one that explodes), the starting Lissajous curve is (sin 4t, sin t) (a = 4, b = 1)

Here are some other math animations from my channel
*********************************************************
On the beautiful geometry of imaginary numbers & complex functions (can be enjoyed even without knowing what that means)
   • Twisting the Plane with Complex Numbers  

All 6 trig functions on the unit circle
   • All 6 Trig Functions on the Unit Circle  

Mathematical art using the idea of epicycles
   • Amazing Epicycles  

Optical illusions made using trigonometric functions
   • Optical Illusions  

Fancy "card tricks" animated using mathematical pretzels (called Lissajous curves)
   • Video  

Sound waves in an oval room:
   • Sound Waves in an Ellipse  

Fly through the 3D Sierpinski pyramid:
   • Fly Thru a 3D Sierpinski Fractal  

Drawing on a spinning white board:
   • Amazing Spirograph  


On this page of the site you can watch the video online String Art with Python with a duration of hours minute second in good quality, which was uploaded by the user Schattman Math 16 February 2021, share the link with friends and acquaintances, this video has already been watched 11,842 times on youtube and it was liked by 295 viewers. Enjoy your viewing!