Sandwich Box Robot - http://www.robotroom.com/Sandwich.jpg
Wooden box Robot - http://media.photobucket.com
The line robot works by using a line of sensors to detect the line beneath it. As you can see from the pictures below, on the left it shows how the robot follows the line and on the right highlighted in red show the route that the robot actually takes.
As you can see the robot has a wave pattern route that it takes whilst following the line. Although we cannot make the robot follow the line directly, we can reduce the wave pattern by adding more sensors.
As you can see from the pictures above by adding a couple of more sensors the robot can detect the line better. As you can see from the picture on the right this thus reduces wave pattern route the robot takes, resulting in a smoother and shorter route that the robot has to take.