I just uploaded my Scratch Hilbert- space-filing curve project to my Scratch page. Here’s a screenshot of the fourth iteration of the curve and the link to the project.
The curve is a one-dimensional line that fills a space! If you want to know the mathematics underlying that astonishing fact I recommend you click on this link and download and read the article, Crinkly Curves, by Brain Hayes. I never miss reading his column as I subscribe to the American Scientist.
His blog also contains a post with even more information about the Hilbert curve.
Dr. Hayes has also posted a wonderful Hilbert curve 'extra' that has an interactive section that maps the points on the unit line interval to the points of the unit square.
I first learned about “pathological curves” like the Hilbert curve when I read the following column. It’s an old article but mathematics is timeless. Try to find Martin Gardner’s Mathematical Games column that appeared in the December 1976 issue of Scientific American magazine. The column is titled In which “monster’ curves force the redefinition of the word “curve”.
Here’s is an update to that column.
When home computers first appeared—soon after the column was published—I enjoyed programming such curves in Logo.
I have also written a PDF file, The Hilbert Curve in Scratch, that describes the programming side. A simple email request is all I need.