Omar Khayyam (1048-1131) was a mathematician who wrote poetry. Here are two quatrains from his Rubaiyat.
For in and out, above, about, below,
'Tis nothing but a Magic Shadow-show
Play'd in a Box whose Candle is the Sun
Round which we Phantom Figures come and go.
And if the Wine you drink, the Lip you press,
end in the Nothing all Things end in -- Yes --
Then fancy while Thou art, Thou art but what
Thou shalt be -- Nothing -- Thou shalt not be less.
Found in Rubaiyat of Omar Khayyam, rendered into English Verse by Edward Fitzgerald (Grammercy Books, 1992).