Credit: User:Jeremykemp, User:pbroks13
A mouse. 1: Pulling the mouse turns the ball. 2: X and Y rollers grip the ball and transfer movement. 3: Optical encoding disks include light holes. 4: Infrared LEDs shine through the disks. 5: Sensors gather light pulses to convert to X and Y velocities.