034

Originally posted on

I wanted to explore how to create a natural looking squiggle. The answer, here, was Fourier transforms, or Fourier epicycles (apologies to mathematicians if I'm misusing these terms). Imagine a second-hand on a clock. At the end of the minute hand is another clock/second-hand but longer or shorter. And at the end of that, another. And at the end of the final hand is a marker. The shape that marker traces will be erratic but continuous. You can actually create a series that will draw any closed shape imaginable. See this The Coding Train video for a demonstration.


I decided it was ok to post more than one in a day, especially since I wasn't making code changes between the 3 outputs seen here. It helped show the variety in one single program and prevented me from spreading one program out over multiple days.

To peel back the process a bit, I would usually run the program a handful to a few dozen times and pick out my favorite result. Maybe I was giving into indecision picking multiple, but it became more and more regular.