Lecture overview -- Keyboard shortcut: 'u'  Previous page: Example of recursion: Hilbert Curves [Section] -- Keyboard shortcut: 'p'  Next page: Building Hilbert Curves of order 1 -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 3 - Page 26 : 42
Functional Programming in Scheme
Name binding, Recursion, Iteration, and Continuations
Hilbert Curves

The Hilbert Curve is a space filling curve that visits every point in a square grid

To see this image you must download and install the SVG plugin from Adobe.In Firefox please consultthis page.

A hilbert curve of order 5 which is traversed repeatedly to emphasize the maze. The view enforced on you through this picture is an iterative one: We traverse the curve one edge after the other. Needless to tell, this gives a very confusing and complicated understanding of the curve. Below, we will explain the curve in recursive terms. It turns out that this will be key to understanding the curve. Relative to the Scheme program shown later, this curve is produced by the call (hilbert 5 'up) .

The path taken by a Hilbert Curve appears as a sequence - or a certain iteration - of up, down, left, and right.