
Infinity Zooming Effect
by marimo team
Interactive recursive zoom simulator with log-polar coordinate transformations and paint!
About this notebook
This marimo notebook creates a Droste effect from an image. The Droste effect nests a picture inside a smaller copy of itself. The notebook uses numpy for the math and Pillow to read and build images. It uses scipy for pixel interpolation and wigglystuff for a paint canvas. There is no fixed dataset. You draw on the canvas or you upload a screenshot. A placeholder frame image loads when no file is present.
Four controls change the result. Two sliders set the scale and the twist. A third slider sets the zoom depth. A radio button picks Spiral Space or Log Space. The notebook shows the source image and the result next to each other. Each control change updates the result.
The apply_droste function runs the transform. It maps each pixel to log- polar coordinates. It then applies the linear map f(z) = c times z. This step creates the spiral and the scaling. A modulo on the log-radius tiles the image and makes the nesting. scipy map_coordinates resamples the three color channels. The function uses mo.cache, so equal inputs reuse the earlier result.











