|
Double Pendulum: Executable or Text Version
The Double Pendulum problem involves a pendulum hanging from a pendulum. It's easy to make one, but it's a pretty ferociously difficult mathematical problem, by most peoples' standards.
To even set up the relevant highly non-linear dual differential equations requires the formidable somewhat abstract mathematical machinery of Lagrangian Dynamics and Generalised Co-Ordinates. Surprisingly though, the program to solve these equations numerically using the Improved Euler Method is fairly short and simple (once I ironed out my algebraic errors, which are very easy to make).
The path of the second pendulum is truly chaotic. The relevant mathematics can be found on the Eric Weisstein Physics site. Alternatively, I've scanned in the 4 pages of mathematical workings I did to get to the right equations for numerical analysis:
My Workings: Pages One Two Three Four
The Program keeps on running until you stop it. The Total Energy (Kinetic + Potential) should remain unchanged throughout the motion, but as time progresses the error in the calculations very slowly accumulates.
Stars: Executable or Text Version
Another bit of complete trivia! This is a screensaver-style program displaying moving, rotating wheel-spokes, but with an Assembly Language routine to dim the entire screen every so often.
|
|