Despite being one of the most brilliant mathematicians in the Abbasid caliphate, Alhasan Ibn al-Haytham makes a quiet living in Basra as a scholar and copyist. He's preparing to write a new treatise on vision and light when a strange man wearing unusual clothes kidnaps him and takes him to Cairo, for a meeting with the caliph, Al-Hakim. The "mad king" of the Fatimid caliphate wants Alhasan to utilize his brilliance to dam the mighty Nile River...