Previously I've dabbled with stepped pendulums, just affected by gravity, where the wire lengths increase in a linear manner - you can get nice sine wave type patterns eg here. I once saw a guy on TV - Stephen Fry - with a multi pendulum model doing just this, and he casually made a throwaway remark 'of course if you let it run long enough, the pendulums return to their original start positions' ie in a straight line.
I thought 'that can't be true'. I tried (in C4D) all combinations of wire lengths and increments, but all I got was
straight line start > sine waves > chaotic movement
I once let a sim run for about 75,000F - but just got chaos and no alignment.
Then I saw some math online that explained the align trick...
I chose a time period for alignment - 20 sec
Using the standard pendulum formula, I calculated the wire length to make the longest pendulum do 18 complete swings (period - T) in 20 secs
I set the length of the next (shorter) pendulum to do 19T in 20 secs
then the next pendulum to do 20T in 20 secs
next 21T in 20 secs etc
up to 27T in 20 sec for the 10th pendulum
In theory, the pendulums should align every 20 sec. I set it running and the alignment was close, but not good enough.
The problem was that the simple pendulum formula
only works for small angles - it uses the approximation (in radians) of
sin(x) = x
which falls down over about 10 degrees. The math for large angles is quite complex - I decided to manually tweak my computed values until the weights lined up.
So the final result was down to a mixture of python and intuition/guesswork. Works quite well.
the pendulums line up every 20s - blink and you'll miss it