File:Double-pendulum.png

From HandWiki

Double-pendulum.png(480 × 547 pixels, file size: 47 KB, MIME type: image/png)

This file is from a shared repository and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Done in Mathematica with the following code:
<< VariationalMethods`
tmax = 1000;
solution = Block[{m, g, \[Theta], L, x, y, v, t},
   x = Accumulate[ 
     Sin[{Subscript[\[Theta], 1], Subscript[\[Theta], 2]}]];
   y = Accumulate[ -Cos[{Subscript[\[Theta], 1], Subscript[\[Theta], 
        2]}]];
   v = D[{x, y} /. 
      Subscript[\[Theta], i_] :> Subscript[\[Theta], i][t], t];
   L = Plus @@ (1/
        2 Map[# . # &, Transpose[v]] - (y /. 
         Subscript[\[Theta], i_] :> Subscript[\[Theta], i][t]));
   NDSolve[Join[Simplify[
      Table[
       EulerEquations[L, Subscript[\[Theta], i][t], t], {i, 1, 2}
       ]
      ], {Subscript[\[Theta], 1][0] == 22/7, 
      Subscript[\[Theta], 2][0] == 22/7, 
      Subscript[\[Theta], 1]'[0] == Subscript[\[Theta], 2]'[0] == 
       0}], {Subscript[\[Theta], 1], Subscript[\[Theta], 2]}, {t, 0, 
     tmax}]
   ];
ParametricPlot[
 Table[Subscript[\[Theta], i][t], {i, 2}] /. solution, {t, 0, tmax}]
Date
Source Own work
Author Grondilu

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.

Captions

Parametric plot for the time evolution of the angles of a double pendulum

Items portrayed in this file

depicts

12 November 2023

image/png

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current00:27, 12 November 2023Thumbnail for version as of 00:27, 12 November 2023480 × 547 (47 KB)imagescommonswiki>Grondiluparametric version

The following file is a duplicate of this file (more details):

The following page uses this file:

Metadata