Talk:Animate a pendulum: Difference between revisions

From Rosetta Code
Content added Content deleted
(Don't sweat over doing it perfectly.)
(No difference)

Revision as of 15:42, 7 August 2009

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)