The magic eye optical illusions create stereographic pictures by taking two rectangles and slightly shifting the patterns, so that when you cross your eyes to overlap them, the subtle differences correspond to height.


This motivates my question: given a continuous function $f$ from the unit square to the interval $[-\delta,\delta]$ for some small $\delta$ (say, .01), do there exist functions $g\_1,g\_2$ from the unit square to the left and right open half spaces, respectively, of the Euclidean plane, such that:


* Each $g\_i$ preserves $y$-coordinates, and
* The distance between the $x$-coordinates of $g\_1(x\_0,y\_0)$ and $g\_2(x\_0,y\_0)$ is $3+f(x\_0,y\_0)$, and
* Each $g\_i$ is within $\delta$ of a translation of the square, using the $\sup$ norm for continuous functions?



A mathematical version of the Magic Eye optical illusion
Yes. For example $g\_2(x,y)=(x+1+\frac{1}{2}f(x,y),y)$ and $g\_1(x,y)=(x-2-\frac{1}{2}f(x,y),y)$.


