You can change the numbers in the code boxes below
(Press stop first!)
Then run the model to see the effect.
//The code in this box runs just once //define the time step dt = .01; //Make this smaller for better accuracy //First give the variables some initial values x=30; v=0; //Now start the simulation running running=true; StepModel();
//The code in this box steps the model v += (-36*x -v)*dt x += dt * v; MoveTrolley(x); //Now keep going round until 'stop' is pressed if(running){setTimeout('StepModel()',10);}