Images of a familiar object in $\mathbb{R}^3$ mapped to $\mathbb{R}^2$ by Cantor/Peano/Hilbert

1.6k Views Asked by At

The proofs that, e.g., the cardinality of $\mathbb{R}^3$ is the same as the cardinality of $\mathbb{R}^2$, map $\mathbb{R}^3 \to \mathbb{R}^2$ via some scheme: Cantor's interleaving decimals, the Peano curve, the Hilbert curve, etc., generalized to higher dimensions.

I would like to see images of some familiar object in $\mathbb{R}^3$—say a sphere or a cube—mapped to $\mathbb{R}^2$. It is common to illustrate the mappings the other way, e.g., showing how the Hilbert curve fills a unit square. But I am interested in the reverse, to help intuition and to better understand the effect of the mappings on an object. I suspect $\mathbb{R}^2 \to \mathbb{R}^1$ would not be illuminating, which is why I ask for $\mathbb{R}^3 \to \mathbb{R}^2$.

Can anyone point me to such images?

1

There are 1 best solutions below

3
On BEST ANSWER

** UPDATE! ** I revisited my old code and generated the following two pictures.

The first picture depicts the mapping of three spheres, each of radius 0.15, from the cube $[0,1]^3$ to the square $[0,1]^2$, where the spheres are centered at $(0.5,0.5,0.5)$ (red), $(0.2,0.5,0.5)$ (green) and $(0.2,0.2,0.2)$ (blue), respectively. I use the same mapping based on Sierpinski curves as described in my original post below.

spheres

The second picture depicts the mapping of three cubes, each of sidelength 0.3, from the cube $[0,1]^3$ to the square $[0,1]^2$, where the cubes are centered at $(0.5,0.5,0.5)$ (red), $(0.2,0.5,0.5)$ (green) and $(0.2,0.2,0.2)$ (blue), respectively.

boxes


Update 2: As you guessed, mapping $\mathbb R^2\to\mathbb R$ is not very illuminating. Here is the mapping of the standard test image "Lenna" to 1D via the Hilbert curve:

lenna


My original post:

I made a few images related to this a few years ago. I didn't map objects in $\mathbb R^3$ to $\mathbb R^2$, but rather I mapped the RGB color space to a two-dimensional picture.

Here is an example. To imagine what a (topological) ball maps to you could for example focus on where the bright red colors map to.

sierpinski 3D to 2D RGB

To be precise, each point $(x,y)\in[0,1]^2$ in the picture corresponds to an RGB-color $\varphi(x,y)=(r,g,b)\in[0,1]^3$, defined by $\varphi=\alpha\circ\beta^{-1}$, where $\beta:[0,1]\to[0,1]^2$ is the space-filling Sierpinski curve (note: although $\beta$ is not invertible, its preimage has a unique element for each pixel in the image), and $\alpha:[0,1]\to[0,1]^3$ is a three-dimensional analogue of the two-dimensional Sierpinski curve (note: I chose one out of many possible natural generalizations of the two-dimensional curve; there seemed to be no canonical choice).

What the image looks like is very dependent on the choice of bijective functions. The image above is the most visually pleasant one I produced. Here are a few others:

  1. Same as above but mapping HSV space instead of RGB space.

sierpinski 3D to 2D HSV

  1. Using the Hilbert curve $[0,1]\to[0,1]^2$ and a three-dimensional analogue of it:

3D to 2D - hilbert_2(x,y)=hilbert_3(+r, +g, +b)

  1. Same as above but with the HSV color space instead.

3D to 2D - hilbert_2(x,y)=hilbert_3(+h, +v, +s)

The Z-curve (equivalent to interleaving decimals), Peano curve and Schoenberg curve produced quite ugly pictures (sorry I don't still have them).