Double Pendulum

external-link

Sep 2024

Finished

This project was intended as a one-day coding session to practice Python, Pygame, and NumPy, and ended up with me playing with the results for three days. The chaos generated by a double pendulum system is quite interesting. The math behind it is simple, involving just two (albeit large) equations. The visuals are amazing and, when properly tweaked, can mesmerize you. Simulations can be customized with a few buttons, and if you give it some time, you can modify the code to enhance it further!

Technologies
python

Python

pygame

Pygame

numpy

NumPy

https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (1)_169.webp?v=8654c27760dc1493e0bf5a88b420ef6bad9b6fb1
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (2)_169.webp?v=0d299befe0861ec9ef3368b32b29174606fdd300
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (3)_169.webp?v=abf194a890a4e980d444560b23536d7f6468dd63
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (4)_169.webp?v=59700225cf2a955a31b68b871c717c08316f5497
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (5)_169.webp?v=1432f0259d305f2ab3fed7a0b49c5ab72bcd9f32
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (6)_169.webp?v=adcd9f4f5b9f3a8f9e5c29384eb72ea0abb63e97
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (7)_169.webp?v=63332e60db383a5df4eb28eb7c212e68e3f07c90
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum.gif?v=ae4336034b51118e52fe9ba3687d23524136a424
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (1)_169.webp?v=8654c27760dc1493e0bf5a88b420ef6bad9b6fb1
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (2)_169.webp?v=0d299befe0861ec9ef3368b32b29174606fdd300
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (3)_169.webp?v=abf194a890a4e980d444560b23536d7f6468dd63
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (4)_169.webp?v=59700225cf2a955a31b68b871c717c08316f5497
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (5)_169.webp?v=1432f0259d305f2ab3fed7a0b49c5ab72bcd9f32
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (6)_169.webp?v=adcd9f4f5b9f3a8f9e5c29384eb72ea0abb63e97
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (7)_169.webp?v=63332e60db383a5df4eb28eb7c212e68e3f07c90
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum.gif?v=ae4336034b51118e52fe9ba3687d23524136a424
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (1)_169.webp?v=8654c27760dc1493e0bf5a88b420ef6bad9b6fb1
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (2)_169.webp?v=0d299befe0861ec9ef3368b32b29174606fdd300
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (3)_169.webp?v=abf194a890a4e980d444560b23536d7f6468dd63
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (4)_169.webp?v=59700225cf2a955a31b68b871c717c08316f5497
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (5)_169.webp?v=1432f0259d305f2ab3fed7a0b49c5ab72bcd9f32
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (6)_169.webp?v=adcd9f4f5b9f3a8f9e5c29384eb72ea0abb63e97
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (7)_169.webp?v=63332e60db383a5df4eb28eb7c212e68e3f07c90
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum.gif?v=ae4336034b51118e52fe9ba3687d23524136a424
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (1)_169.webp?v=8654c27760dc1493e0bf5a88b420ef6bad9b6fb1
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (2)_169.webp?v=0d299befe0861ec9ef3368b32b29174606fdd300
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (3)_169.webp?v=abf194a890a4e980d444560b23536d7f6468dd63
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (4)_169.webp?v=59700225cf2a955a31b68b871c717c08316f5497
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (5)_169.webp?v=1432f0259d305f2ab3fed7a0b49c5ab72bcd9f32
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (6)_169.webp?v=adcd9f4f5b9f3a8f9e5c29384eb72ea0abb63e97
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum (7)_169.webp?v=63332e60db383a5df4eb28eb7c212e68e3f07c90
https://raw.githubusercontent.com/MiquelGomezCorral/Double-pendulum/main/readme_images/Pendulum.gif?v=ae4336034b51118e52fe9ba3687d23524136a424