Pendulum Waves Animation

Inpired by this video:


I tried to simulate the cool visual of Pendulum Waves in Wolfram Language.

pendulum[r_,\[Theta]_,h_]:=With[{d={h,0,0},p={h,-r Sin[\[Theta]],-r Cos[\[Theta]]}},
	Graphics3D[{Specularity[White,30],Red,Sphere[p,0.03],Line[{d,p}]}
		,PlotRange->{{0,1},{-0.5,0.5},{(*Z*)-0.9,0}}
		,ViewPoint->Left
	]
]

Animate[Show[Table[pendulum[r,0.5Sin[ 2\[Pi](r) t],r],{r,0.4,0.8,0.02}],ImageSize-> 300]
		,{t,0,15,0.01}
		,AnimationRate->0.5
		]

Here is the result:
PendulumWaves.gif

I don’t know why, but If I try to simulate using the more realist frequency (1/r), the visual effect is not so nice.
Improvments are always welcome!

5 Likes

Rodrigo - great! - very concise - thanks for sharing. Have you seen another version by Stan Wagon and S. M. Blinder?

Pendulum Waves

1 Like

@SamCarrettie No, I didn’t!
Tks for sharing. Much better then mine!