ScratchData LogoScratchData
Back to popswilson's profile

Hilbert's Space-filling Curve

POpopswilson•Created April 20, 2013
Hilbert's Space-filling Curve
16
10
1996 views
View on Scratch

Instructions

Press the Spacebar ONE TIME, sit back, and watch the script start with the generator and cycle through six iterations of the curve. The term 'curve' is used in the mathematical sense to describe a 1-dimensional line and not in the 'opposite of straight' sense used in daily conversation. Even though the script generates a 1-dimensional line, at the limit, the curve 'fills' the square, to create a 2-dimensional surface!

Description

This projects contains lists with thousands of elements in each list. One list contains over 50,000 elements so the project takes time to load. The project uses the Lindenmayer string replacement method for creating the drawing instructions list needed for each iteration of the curve. I left the script (List Builder) in the scripts section so that you a see the string replacement code used to create the list needed for each iteration of the Hilbert curve. All of the lists, generator through iteration six, have been built so I disconnected the green flag block so that no list is inadvertently overwritten. IF YOU WANT TO KNOW THE MATHEMATICS Brian Hayes writes the Computing Science column for the American Scientist magazine. His column for the May-June 2013 issue is called 'Crinkly Curves' and is an excellent presentation of the mathematics and mathematicians, like Peano and Hilbert, whose names are associated with their respective space-filling curves. Dr. Hayes' blog has these excellent resources: http://bit-player.org/2013/mapping-the-hilbert-curve http://bit-player.org/extras/hilbert/ An older but also excellent resource is 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”.

Project Details

Project ID3278475
CreatedApril 20, 2013
Last ModifiedNovember 1, 2013
SharedApril 20, 2013
Visibilityvisible
CommentsAllowed