I hope the following applet is what you want.

There are two cars in this simulation.
Those two cars have the same initial conditions.
When radio button labeled "all" is checked: (default state when "initialize" button is clicked).
You can adjust initial velocity, reaction time and friction coefficient for both cars with sliders.
If you radio button "2" is checked:
The sliders only change values for car number 2.

Both cars will move from left to right after you click "play" button.
The simulation assume at a random time (selected by random number), both driver saw something bad happened
and s/he will stars to hit the brake and stop the car (However, the reaction time and stopping are controlled by adjustable slider(reaction time/friction coef.) before you click play button.

The V-t diagram will save the last three sets of v-t traces so different conditions can be compares.
Let me know if you need more features!


VIEW or DOWNLOAD ejs xml source
then click to translate strings for selected locale.


Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop.