Pendulum Plots

This is a quick post showing an alternative way to display the result of plotting double, triple and quadruple pendulums.

Based on my previous magnetic pendulum simulation and plots I had the idea to try a similar plot style for the double, triple and quadruple pendulums.

If you simulate a pendulum attached to another pendulum in zero gravity without any friction you get a system that runs continuously and creates a plot like the following gif animation.

With 3 pendulums the plot is more complex.

With 4 it is even more complex.

Another way to visualize this is to plot a 2D image with the X axis being 0 to 360 degrees of the first pendulum and the Y axis being 0 to 360 degrees of the second pendulum. The simulations are run for 5000 steps at each pixel location. Depending on which quadrant of the screen the pendulum is in after the 5000 steps determines the color of the pixel (red, green, blue or yellow). The top left pixel sets the pendulum angles to both 0, runs the simulation for 5000 steps and because the end of the two pendulums is located in the lower left quarter of the screen the pixel is colored green. This process is then repeated for the remaining pixels of the image.

Here is the result for the double pendulum

and the triple