Ibn al-Haytham was the first to correctly explain the theory of vision, and to argue that vision occurs in the brain, pointing to observations that it is subjective and affected by personal experience. He also stated the principle of least time for refraction which would later become the Fermat's principle. He made major contributions to catoptrics and dioptrics by studying reflection, refraction and nature of images formed by light rays. Ibn al-Haytham was an early proponent of the concept that a hypothesis must be supported by experiments based on confirmable procedures or mathematical reasoning—an early pioneer in the scientific method five centuries before Renaissance scientists, he is sometimes described as the world's "first true scientist". He was also a polymath, writing on philosophy, theology and medicine.