Space filling curve
Q: How do you catch a lion in the Sahara? A: Run along a space filling curve carrying a spear. ($\dagger$) Surprisingly, it is possible to construct a continuous and surjective map $[0,1]\mapsto [0,1]^2$. In less techie language: you can plot a curve that fills space. But how do you do it? The answer uses the following four maps $[0,1]^2\mapsto [0,1]^2$. $$ \begin{align} & \phi_0(x,y) = \frac{1}{2}(y,x) & \text{flip about diagonal and shrink}\\ & \phi_1(x,y) = \frac{1}{2}(x,y)+(0,\frac{1}{2}) & \text{shrink and translate to top left}\\ & \phi_2(x,y) = \frac{1}{2}(x,y)+(\frac{1}{2},\frac{1}{2}) & \text{shrink and translate to top right}\\ & \phi_3(x,y) = \frac{1}{2}(1-y,1-x)+(\frac{1}{2},0) & \text{flip, shrink & translate to bottom right}\\ \end{align} $$ In words the recipe goes like this: start off with any continuous map $\gamma:[0,1]\mapsto[0,1]^2$ with $\gamma(0) = (0,0)$ and $\gamma(1)=(1,0)$. apply al