physics simulation of double pendulum system built with C++ and Qt6.
The double pendulum is a classic example of a chaotic system in physics. Small changes in initial conditions lead to vastly different outcomes over time. This project simulates the motion of two connected pendulums using Lagrangian mechanics and numerical integration.
The simulation solves the coupled differential equations of motion derived from the Lagrangian of the system:
Where:
theta1,theta2- angles of the first and second pendulumm1,m2- masses of the pendulum bobsl1,l2- lengths of the pendulum rodsg- acceleration due to gravity
- Real-time simulation at 60 FPS
- Accurate physics using Euler integration method
- Visual representation with rods and colored bobs
- Start/Stop control
- C++17
- Qt6 (Widgets, Graphics View Framework)
- CMake
- Qt6 (6.7 or later recommended)
- CMake 3.16+
- C++17 compatible compiler
mkdir build && cd build
cmake ..
make
./simulationOr open the project in Qt Creator and build from there.
This project is open source and available for educational purposes.

