An animation of the classic "double pendulum" model that demonstrates chaos. This was made using matplotlib, and all of the maths and the basis of the animation was drawn from matplotlib example. However I then refactored this code so I had a double pendulum class to work with, and created separate subplots with different starting parameters. I also made it plot the trail of each bob as the animation progressed. I also added a tiny tiny command line interface.
Here is an image of the chaotic behaviour it might exhibit - the only difference in starting conditions was that one pendulum was 10 degrees higher:
See also this video of it in action.
It now also includes a Processing sketch that uses an iterative model of the double pendulum. This sketch drew the maths from the video and code by Daniel Shiffman, although mostly for formulae - the sketch is now in an entirely different language, for example. It has similarly been modified to encapsulate each double pendulum in an object, and shows two simultaneously. It looks like this:
The crucial difference between the two animations is that the first is more accurate, but the second is iterative so slightly less processing-intensive near the start and can continue indefinitely.