This is a frictionless double pendulum with two lengths and two masses, solved using Lagrangians and the Runge-Kutta method.
Initializes a timer that simulates a double pendulum's motion, updating positions and refreshing the form.
Implements the Runge-Kutta numerical integration method to update the positions and velocities using four intermediate values (k1, k2, k3, k4) at each time step. Then uses a weighted average of these values to update the pendulum's parameters.
Calculates the derivatives of the double pendulum's position and velocity with respect to time. Commented-out lines will add damping effects to the pendulum, simulating loss of energy due to friction.
Visual rendering calculates the positions of the pendulum masses, updates a trail of colored circles at the second pendulum's tip, and removes older circles to maintain a clear representation of the motion.
Copyright (c) 2026 Adam Kingry. Licensed under the MIT License.




