a ball mouse is an older mouse and works differently to an optical mouse. A ball mouse has many moving parts. As the ball inside the mouse moves over the surface the ball pushes two plastic rollers connected to thin wheels. One senses movement in the x axis another senses the y axis. As the ball moves the roller turns both wheels. As the wheel rotates it brakes a light beam. Counting the number of times the beam is broken this measures how far the mouse has traveled.