Does there exist a space filling curve which sends every convex set to a convex set?
Solution 1:
Partial answer: Here is a discontinuous surjective function $f:[0,1]\rightarrow[0,1]^2$ that maps convex sets to convex sets. We can make sure every interval maps to the entire (convex) set $[0,1]^2$.
Let's say that two real numbers are in the same equivalence class if their unique decimal expansion (with no infinite tail of 9s) differs only in a finite number of digits. For example $0=0.0000...$, $1=1.0000...$, $1/2=0.50000...$ are all in the same equivalence class.
Let $A$ be the set of all equivalence classes. The cardinality of $A$ is the same as that of the reals, which is the same as that of $[0,1]^2$. So there is a surjective function $g:A\rightarrow [0,1]^2$. For each $x\in[0,1]$ let $a(x) \in A$ denote its equivalence class. Define $f:[0,1]\rightarrow[0,1]^2$ by $$ f(x) = g(a(x))$$ Let $I\subseteq[0,1]$ be an interval (containing more than one point). Then $I$ contains points from all equivalence classes in $A$, so $f(I)=[0,1]^2$.
All convex subsets $C \subseteq [0,1]$ that contain at least two distinct points must contain the interval between those points, so $f(C)=[0,1]^2$. And of course all single-point sets map to single-point sets.
Note: I originally overlooked the continuity requirement, as zhw notes below. So I have edited to emphasize that.