How (and why) to take a logarithm of an image
Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Escher’s “Print Gallery” loop can be recreated by applying a complex logarithm to a self-similar (Drosta) image, then rotating/scaling the resulting doubly periodic tiling, and finally applying an exponential.
Briefing
M.C. Escher’s “Print Gallery” (1956) works like a visual paradox: a viewer can walk a continuous loop while the scene “zooms” deeper and deeper, yet the local geometry stays recognizable. The core finding behind the piece’s construction is that the loop can be recreated by translating the artwork into complex-number geometry—specifically by taking a logarithm to convert a self-similar zoom into a doubly periodic tiling, then rotating/scaling that tiling, and finally applying an exponential to map it back into a warped, conformal scene.
The ambiguity at the center of Escher’s lithograph—where a blank circular region forces the viewer to decide what “space” they’re in—turns out not to be a random artistic flourish. It’s the natural consequence of how the nested “Drosta effect” zoom is encoded. Escher’s scene contains a picture inside a picture inside a picture, repeating at a fixed zoom factor; in the Print Gallery, the self-similar copy is 256 times smaller. The viewer’s gaze around the loop effectively performs that zoom implicitly, so the “where am I?” question collapses into a single geometric transition.
To unpack how this happens, the analysis referenced in the video traces Escher’s process through three steps. First comes a straightened, self-similar reference image: a man looking at a print that contains the same man looking again, ad infinitum. Second comes a warped grid—an engineered mesh warp—that tells the artist how to copy tiny square regions from the reference image into their new positions. The grid is chosen so that, locally, the bounded regions remain approximately squares rather than becoming general parallelograms. That local “square-preserving” behavior is the hallmark of conformal maps, a special class of transformations in complex analysis.
The mathematical bridge is that complex functions with derivatives behave like locally rigid motions plus scaling: at sufficiently small scales, they preserve angles and keep tiny shapes approximately square. This is why polynomials like z² and z³ look warped globally but conformal locally. The video then narrows in on two functions that do the heavy lifting for Escher’s effect: the complex exponential e^z and the complex logarithm log(z). Exponentials turn vertical lines into circles because increasing the imaginary part by 2π completes a full rotation. Logarithms reverse that unwrapping: circles become vertical lines, and because exponentials are many-to-one, the logarithm becomes naturally multi-valued—handled by periodic tiling.
For the Print Gallery’s nested zoom, the logarithm converts the Drosta zoom into a pattern that repeats both vertically (from rotational periodicity) and horizontally (from the zoom factor, since multiplying by 16 becomes shifting by log 16). After that, a carefully chosen rotation and scaling realigns a diagonal path in log-space so that, once exponentiated, it closes into Escher’s loop while matching the required 2π periodicity. The final exponential “unwarps” the tiling into the warped scene, and the conformal property ensures local recognizability even as the global geometry spirals inward.
In the end, the piece isn’t just a clever optical trick. It’s a meeting point between artistic constraints—Escher’s insistence on a rigid local rule like “little squares stay little squares”—and deep mathematics, where doubly periodic structures connect to elliptic functions and modern number theory. The result feels like a puzzle that fits perfectly, not because the solution was obvious, but because the underlying structures were universal enough to attract both an artist and a mathematician.
Cornell Notes
Escher’s “Print Gallery” can be reconstructed using complex analysis by chaining three operations: take a logarithm, rotate/scale the resulting pattern, then apply an exponential. The logarithm turns the artwork’s self-similar “Drosta” zoom into a doubly periodic tiling because exponentials relate rotation (period 2π) to vertical motion, while logarithms convert zoom scaling into horizontal shifts by log(zoom factor). The conformal nature of complex functions explains why local geometry stays recognizable: tiny regions remain approximately square under these transformations. With the right alignment in log-space, a path that represents the nested zoom closes into the self-contained loop seen in Escher’s lithograph.
Why does taking a complex logarithm of a self-similar image produce a repeating tiling pattern?
What does “conformal” mean here, and why does it matter for Escher’s look?
How do exponentials and logarithms connect lines and circles in the complex plane?
What role does the warped grid (mesh warp) play in the artistic construction?
Why is the diagonal path in log-space important for closing the loop?
How does the zoom factor (256) translate into logarithms?
Review Questions
- How does the 2π periodicity of the complex exponential influence the structure of the logarithm image?
- Explain, using the conformal/local-scaling intuition, why tiny squares can remain approximately square under complex transformations even when the global picture is warped.
- What alignment condition must hold in log-space so that exponentiating produces a closed loop rather than an open curve?
Key Points
- 1
Escher’s “Print Gallery” loop can be recreated by applying a complex logarithm to a self-similar (Drosta) image, then rotating/scaling the resulting doubly periodic tiling, and finally applying an exponential.
- 2
The complex exponential e^z maps vertical lines to circles because increasing the imaginary part by 2π completes one full rotation in the output.
- 3
The complex logarithm log(z) unwraps circles back into vertical lines, producing a multi-valued structure that manifests as periodic tiling.
- 4
Complex functions behave conformally at small scales: locally they act like rotation plus scaling, so tiny regions remain approximately square rather than becoming general distorted parallelograms.
- 5
Escher’s mesh warp can be understood as a grid transfer process whose success depends on choosing a warped grid that preserves local square geometry, matching conformal behavior.
- 6
Doubly periodicity in log-space comes from two sources: vertical repetition from 2π rotation and horizontal repetition from the Drosta zoom factor via shifts by log(zoom).
- 7
Loop closure requires aligning a path in log-space so that, after exponentiation, it becomes a 2π-tall vertical segment that maps to a closed circle.