A PyGame simulation of the motion over time for an interconnected mass-spring-system with n masses. The masses are oscillating on a horizontal and frictionless surface.
The user can input some initial conditions on the position of each mass. For each new initial condition, a new mass is added into the system. It's assumed that all masses are identical, and that they all start from rest. Through some mathematical derivation, the equations of motions are derived for each and every block. The derivations can be found in the uploaded pdf.
The solution of the motion of each block over time is then plotted using matplotlib. After this window has been closed, a PyGame simulation of the development of the system over time will be presented.
The floor.jpg file is used as a background for the PyGame simulation, but the user is of course to change that to their preferred style.