By aschinchon
It seemed that everything is in ruins, and that all the basic mathematical concepts have lost their meaning (Naum Vilenkin, Russian mathematician, regarding to the discovery of Peano’s curve)
Giuseppe Peano found in 1890 a way to draw a curve in the plane that filled the entire space: just a simple line covering completely a two dimensional plane. Its discovery meant a big earthquake in the traditional structure of mathematics. Peano’s curve was the first but not the last: one of these space-filling curves was discovered by Hilbert and takes his name. It is really beautiful:
Hilbert’s curve can be created iteratively. These are the first six iterations of its construction:
As you will see below, R code to create Hilbert’s curve is extremely easy. It is also very easy to play with the curve, altering the order in which points are sorted. Changing the initial matrix(1)
by some other number, resulting curves are quite appealing:
Let’s go futher. Changing ggplot
geometry from geom_path
to geom_polygon
generate some crazy pseudo-tessellations:
<img width="150" height="150" src="https://aschinchon.files.wordpress.com/2016/02/hilbert_polygons5.jpg?w=150&h=150" alt="hilbert_polygons5" data-attachment-id="1947" …read more
Source:: r-bloggers.com