Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 1.51 KB

File metadata and controls

24 lines (13 loc) · 1.51 KB

Double Pendulum Chaotic System

This is a frictionless double pendulum with two lengths and two masses, solved using Lagrangians and the Runge-Kutta method.

pend1

Initializes a timer that simulates a double pendulum's motion, updating positions and refreshing the form.

load

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.

kutta

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.

calc

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.

paint

License

Copyright (c) 2026 Adam Kingry. Licensed under the MIT License.