The author takes up the topic of optical illusions and their mental interpretation by sighted people. The basis for the study is provided by an analysis of examples in Book IV of Witelo's 'Perspectiva' and his philosophical letter to Ludwig at Lwówek Slaski (Loewenberg). The 13th-century Silesian scholar based his theory on the ideas of Ibn al-Haitham (Alhazen), an optician, astronomer, catoptrician and mathematician active in Egypt in the first half of the 11th century. Witelo interpreted the figures of demons that thrived in the minds of his contemporaries as optical illusions transformed by the imagination. The notion of phantasms, figures appearing as result of optical conditions at dawn and dusk, is an original term of Witelo's and, until today, his only precise one - it refers to true figures completely transformed by human imagination. Witelo gives examples of real human and animal figures that have undergone multiple enhancement in the eyes of those who perceive them, due to the optical conditions that obtain at the time. The use of Witelo's term, 'phantasms', was later abandoned. The basis for all further interpretation of the phenomenon is provided by Witelo's geometric theorem from Book IV of his 'Perspectiva': 'All things viewed at the same angle, unless and until their distance (from the observer) is investigated, appear equal'. The interpretation of such phenomena by Witelo was quite novel in the late Middle Ages and in a way it heralded the coming of a new epoch in the history of human thought.