Take a look at project.pdf
for the physics.
This is a simulation of the Swinging Atwood's Machine using a 4th-order Runge-Kutta algorithm. The Swinging Atwood's Machine (SAM) is an extension of the prototypical Atwood's machine where one mass is permitted an additional degree of freedom to swing. This particular system is an excellent example of how even simple systems can exhibit characteristics of chaos.
The following video is a sequential aggregation of several trajectories over incrementally varying intial conditions, and produces quite an interesting progression:
The code in this repository generates images of various trajectories given a set of varying initial conditions: Below are examples of non-chaotic and chaotic trajectories, respectively.
The dynamics of this system are most easily described using the generalized coordinate system established by the diagram below. From the Euler-Lagrange equations, this system yields the following coupled, second-order, ordinary differential equations: