Mass-Spring System Simulation (adapted from Nathan Albin)