If you find visual illusions fascinating, Programming Visual Illusions for Everyone is a PDF ebook especially for you. It has some background, some history and some theories about visual illusions, and it describes in some detail 12 illusions. Some are about surfaces, some are about colour, some are about apparent size of objects and some involve movement. This is only one aspect of the ebook. The other is to show you how you can create these effects on any computer.
The ebook includes a brief introduction to a powerful programming language called Python. No previous experience with computer programming is necessary. There is also an introduction to a package called PsychoPy that makes it easy to draw on a computer screen. It is perfectly ok if you have never heard the names Python or PsychoPy before. Python is a modern and easy-to-read language, and PsychoPy takes care of all the graphical aspects of drawing on a screen and also interacting with a computer. By the way, both Python and PsychoPy are absolutely free.
Is this a book about illusions or about programming? It is both!