While serving as a lieutenant of engineers in Napoleon's army in 1813, Jean Victor Poncelet was badly wounded and left for dead on the Russian battlefield. Though captured by the Russians and marched through four months of winter, he survived and became a prisoner of war. During his 18-month incarceration in a rectangular cell, he meditated on geometry.
The result? His Trait? des proprietes projectives des figures (Treaty on Projective Geometry) -- a book widely considered to be the foundation of modern geometry.