Illusion of Space

2025

Illusion Frame

Overview

This image plays with the perception of three-dimensional depth using only two-dimensional geometry. At first glance, it seems to draw the eye into a tunnel or infinite hallway, an illusion created entirely by the spacing and scaling of simple squares. As each square recedes, our brain interprets the shrinking shapes as markers of distance, even though they sit perfectly flat on the screen. The illusion takes advantage of how we naturally associate smaller objects with being farther away, tricking our visual system into imagining space where there is none.

Visually, the effect echoes certain architectural sketches or the feeling of walking through a narrowing corridor. The consistent alignment of corners, the uniform line thickness, and the clean contrast between figure and background contribute to the sensation of forward motion. It recalls classic optical illusions but leans on structure rather than distortion. Rather than warping lines or bending perspective, it creates a false sense of dimensionality through repetition and order alone.

To generate this, I used a for loop to draw a sequence of nested squares, each one translated slightly inward and scaled down by a fixed ratio. The initial square is large and sits at the origin. With each iteration, the top left corner is moved forward while the length is divided by a scale factor slightly above one, such as 1.1 or 1.15. This results in a geometric progression where each square shrinks proportionally from the last. Mathematically, if L0 is the original side length, then Ln = L0 / rⁿ, where r is the scaling ratio and n is the iteration index. The regular spacing and ratio compound to give the illusion of spatial acceleration and visual compression, turning a flat plane into a false tunnel.

You can find my code repository here.