have you ever tried to balance a pencil on your finger? It seems almost impossible as pencil height and mass is too small to catch up the movement. So guys from Neuroinformatics Institute constructed pretty complex vision sensor based system just to do this job.
To capture pencil current position they used two video sensors to get visual information. Then algorithm calculates pencil position and angle and gives command to motor controller to move it in order to keep it vertical. As they claim this is some kind of Neural Information Processing System. Knowing that it only relies on visual information it is quite impressive.