Born in Basra, he spent most of his productive period in the Fatimid capital of Cairo and earned his living authoring various treatises and tutoring members of the nobilities. Ibn al-Haytham is sometimes given the byname al-Baṣrī after his birthplace, or al-Miṣrī ("the Egyptian"). Al-Haytham was dubbed the "Second Ptolemy " by Abu'l-Hasan Bayhaqi and "The Physicist" by John Peckham. Ibn al-Haytham paved the way for the modern science of physical optics.