File:Chain of pendula.gif

Summary

Description
English: If instead of a double pendulum you chain many together, they behave like a chain. If there is no friction or restriction on curvature, the system start showing its chaotic nature after a while.
Date
Source https://twitter.com/j_bertolotti/status/1346753297223458817
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.0 code

n = 10;
vars = Table[\[Theta][j, t], {j, 1, n}];
coord = Accumulate@Table[r[j, t] = {Sin[vars[[j]] ], Cos[vars[[j]] ]}, {j, 1, n}];
norm[v_] := Sqrt[Sum[v[[j]]^2, {j, 1, Dimensions[v][[1]]}]];
L = FullSimplify[(Total[(norm /@ D[coord, t])^2] - Total@coord[[All, 2]])];
eqs = FullSimplify@Table[D[D[L, \!\(\*SuperscriptBox[\(\[Theta]\), TagBox[RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}],Derivative],MultilineFunction->None]\)[j, t]], t] - D[L, \[Theta][j, t]] == 0, {j,1, n}];
initialcond01 = Table[\[Theta][j, 0] == \[Pi] - \[Pi]/2.5 - RandomReal[{-10^-6, 10^-6}], {j, 1, n}];
initialcond02 = Table[\[Theta][j, 0] == \[Pi] - \[Pi]/2.5 - RandomReal[{-10^-6, 10^-6}], {j, 1, n}];
initialcond03 = Table[\[Theta][j, 0] == \[Pi] - \[Pi]/2.5 - RandomReal[{-10^-6, 10^-6}], {j, 1, n}];
initialcond2 = Table[\!\(\*SuperscriptBox[\(\[Theta]\), TagBox[RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}],Derivative], MultilineFunction->None]\)[j, 0] == 0, {j, 1, n}];
sol1 = NDSolve[Join[eqs, initialcond01, initialcond2], vars, {t, 0, 500}, Method -> {"EquationSimplification" -> "Residual"}];
sol2 = NDSolve[Join[eqs, initialcond02, initialcond2], vars, {t, 0, 500}, Method -> {"EquationSimplification" -> "Residual"}];
sol3 = NDSolve[Join[eqs, initialcond03, initialcond2], vars, {t, 0, 500}, Method -> {"EquationSimplification" -> "Residual"}];
frames = Table[
   Graphics3D[{
     Thickness[0.005],
     Cyan,
     Sphere[{0, 0, 0}, 0.2],
     Table[ Sphere[ Join[Evaluate[((coord /. sol1)[[1, j]]) /. {t -> \[Tau]} ], {0}], 0.2], {j, 1, n}], 
     Line[Join[{{0, 0, 0}}, Table[Join[Evaluate[((coord /. sol1)[[1, j]]) /. {t -> \[Tau]} ], {0}], {j, 1, n}]]]
     ,
     Orange,
     Sphere[{0, 0, 0}, 0.2],
     Table[Sphere[Join[Evaluate[((coord /. sol2)[[1, j]]) /. {t -> \[Tau]} ], {0}], 0.21], {j, 1, n}], 
     Line[Join[{{0, 0, 0}}, Table[Join[Evaluate[((coord /. sol2)[[1, j]]) /. {t -> \[Tau]} ], {0}], {j, 1, n}]]]
     ,
     Purple,
     Sphere[{0, 0, 0}, 0.2],
     Table[Sphere[Join[Evaluate[((coord /. sol3)[[1, j]]) /. {t -> \[Tau]} ], {0}], 0.22], {j, 1, n}], 
     Line[Join[{{0, 0, 0}}, Table[Join[Evaluate[((coord /. sol3)[[1, j]]) /. {t -> \[Tau]} ], {0}], {j, 1, n}]]]
     }, PlotRange -> {{-n - 1, n + 1}, {-n - 1, n/2}, {-1, 1}}, Background -> Black, ViewPoint -> Above, Boxed -> False]
   , {\[Tau], 0, 300, 1}];
ListAnimate[frames]

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Chain%20of%20pendula.gifCategory:Self-published work
Category:Animated GIF files Category:Animations of Chaos theory Category:Double pendulums Category:Images with Mathematica source code Category:Animated GIF files between 50 MP and 100 MP
Category:Animated GIF files Category:Animated GIF files between 50 MP and 100 MP Category:Animations of Chaos theory Category:CC-Zero Category:Double pendulums Category:Images with Mathematica source code Category:Self-published work