Following up on the post about Lorenz systems I have made a visualization of the double pendulum. Both of these systems are prime examples of systems studied in chaos theory. That is: systems that are highly sensitive to initial conditions.

Many of these systems can also be seen in nature. For example the weather. One of the problems is that numbers in nature are non computable. They simpy can not be estimated to within arbitrary precision by any program. This is kind of a scary thought.

Back to the system at hand. I used the wiki, the explanation there is probably better. But here is my take anyway. The double pendulum can be described by 7 variables:

- gravity constant
- length both rods
- mass both rods
- angle first rod
- angle second rod
- momentum first rod
- momentum second rod.

The total energy (Langrangian) in the system consists of:

- linear kinetic energy \(E_k = \frac{1}{2} m v^2\)
- rotational kinetic energy \(E_r = \frac{1}{2} I \omega^2\)
- potential energy \(E_p = mgh\)

We use some other identities to fill in these formula’s:

- moment of inertia thin rod \(I = \frac{1}{12} m l^2\)
- x-center of mass rod \(x = \frac{l}{2} \sin \theta\)
- y-center of mass rod \(y = \frac{l}{2} \cos \theta\)
- 2d velocity \(v = \dot{x} + \dot{y}\)

We throw all this together to get our pendulum applet. Have a happy new year!