# Avoid the Crash

Applet begins with red truck entering the gray area from the left and moving across with constant velocity to the right. It is followed by a green truck. The green truck's motion is initially uniform, but it can be slowed down when it is at a set distance behind the red truck. The velocity of green and red trucks can be changed using the appropriately colored tabs. The magnitude of the acceleration of the green truck when it starts slowing down can also be changed. The distance parameter is the distance between the two trucks when the rear truck begins to slow down. Try and find ways of avoiding collision between the trucks. ( This distance is the distance between the rear end of red truck and the front end of the green truck )

Actual collision is not shown here, and the trucks are allowed to pass each other. You could imagine the trucks are moving in parallel lanes and you would like to slow down the green truck to the speed of the red truck just as its front end is at the rear end of the red truck.

Distances are measured from the left to the rear end of red truck and from left to the front end of the green truck. Time is measured from the moment when the green truck appears at the left end.