Talk:Animate a pendulum

From Rosetta Code
Revision as of 15:42, 7 August 2009 by rosettacode>Dkf (Don't sweat over doing it perfectly.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

It's moderately tricky to make this work perfectly, especially for large amplitudes. The issue is that there is no neat analytic solution of the equation of motion (not without getting into fairly hairy maths). Since this is to demonstrate simulation and not mathematical prowess, I suggest hacking it. (I have some code that simultaneously plots a phase diagram when running the simulation, which is very nice but detracts from the basic requirements of the task so I omitted it.) —Donal Fellows 15:42, 7 August 2009 (UTC)