Optical illusion are fascinating while teaching us about our visual perception, and limits thereof.
It characterized by visually perceived images that differ from objective reality. The information gathered by the eye is processed in the brain to give a perception that does not tally with a physical measurement of the stimulus source. There are three main types: literal optical illusions that create images that are different from the objects that make them, physiological ones that are the effects on the eyes and brain of excessive stimulation of a specific type (brightness, colour, size, position, tilt, movement), and cognitive illusions, the result of unconscious inferences.
Research indicates that 3D vision capabilities emerge and are learned jointly with the planning of movements. After a long process of learning, an internal representation of the world emerges that is well-adjusted to the perceived data coming from closer objects. The representation of distant objects near the horizon is less "adequate". In fact, it is not only the Moon that seems larger when we perceive it near the horizon. In a photo of a distant scene, all distant objects are perceived as smaller than when we observe them directly using our vision.
The retinal image is the main source driving vision but what we see is a "virtual" 3D representation of the scene in front of us. We don't see a physical image of the world; we see objects, and the physical world is not itself separated into objects. We see it according to the way our brain organizes it. The names, colours, usual shapes and other information about the things we see pop up instantaneously from our neural circuitry and influence the representation of the scene. We "see" the most relevant information about the elements of the best 3D image that our neural networks can produce. The illusions arise when the "judgments" implied in the unconscious analysis of the scene are in conflict with reasoned considerations about it.