First of all, in my initial and brief research into harmonographs I learnt quite a bit about the history of drawing machines and the many different kinds of harmonographs and related devices. But I soon decided that, for my online simulation, I would stick to the three-pendulum rotary harmonograph that had inspired me in the first place.
The key elements of a harmonograph are the pendulums that make the pen and paper move so harmoniously. So, to write my simulation, I needed to figure out how pendulums move. I hadn’t thought about damped harmonic oscillators (huh?) for a long time, so it took me quite a while to get to grips with the pendulum formula again.
Once I had the pendulums figured out, I had to grapple with the geometry of the arms that connect two of the pendulums to the pen. I found a solution from someone who had used a lot of Pythagoras for that, but I preferred to work it out myself with trigonometry instead. That took some effort, but was also very satisfying once I got it right.
So, in the end, what started as a simple coding project turned out to be a (re)learning experience in physics and mathematics as well as programming. And, maybe because I hadn’t really foreseen that, it was all very enjoyable and rewarding. You can play around with the final product here.
If you are keen to embark on a coding project (with likely side benefits) yourself but don’t quite know how, why not come down to the Science Centre this Friday, for the “Code for Fun, Code for All” event? You will get to try different aspects of coding, including scratch programming, computer sensing and hardware control, and sorting things with algorithms. (more info)