Bug in a Rug tests M. C. Escher-inspired point-remapping on a 2D raster image: a drawn height field shifts source pixels to simulate depth, while proving that color changes are part of the illusion, not decoration.
Dragging writes height into the source map. Each stroke starts at zero height, fades up to the active brush, and leaves a persistent raised trail. The toy then remaps source pixels and adds brush-side tint, shade, and rimlight cues from the same height data.
The effect is readable only when geometry and color agree. Black areas and flat-color areas can destroy the depth cue because there is no local texture for the remap to reveal; the brush needs tint, shade, and a restrained rimlight to help a flat raster image read as a raised surface.
This is not an Escher reconstruction, but it touches the same broad idea of a picture being governed by a coordinate map. Escher's Print Gallery has been studied as a mathematical image transformation, and his circle-limit work is often discussed as a distorted map of hyperbolic space. Bug in a Rug keeps the idea much smaller: source-image coordinates in one raster image are lifted by a brush-written height map, projected, tinted, shaded, and drawn back to the screen.
- This toy follows earlier image-warp sketches but replaces the failed field warp and pasted-box attempts with a projected mesh.
- The interaction is narrowed to a brush-written height map, per-stroke projection direction, brush falloff, and the Gum texture.
- The current purpose is to test whether 2D raster point-remapping can simulate depth, and where the illusion fails when source color or brush tint/shade is removed.
- The built-in image is Gum, supplied by Shane Curry for this demo.
- Escher and the Droste effect documents the mathematical structure behind Escher's Print Gallery.
- EscherMath on hyperbolic geometry describes the circle-limit prints as distorted maps of hyperbolic space.
Shane Curry, "Bug in a Rug," https://shanecurry.com/lab/toys/bug-in-a-rug/, published 2026-05-01.
Nothing is hiding under the picture except one raster image, a height-map array, a coordinate remap, and the color cues needed for that remap to read as depth.