The paths of billiard balls on a table can be long and complicated. To understand them mathematicians use a beautiful trick, turning tables into surfaces.