The Java applet above draws the Hilbert curve of order n = 1 to 6. Each order of the Hilbert curve consists of 4 copies of the curve of the previous order replicated on a smaller scale.
order
length of Hilbert Curve
1
3/2
1.5
2
(4 x 3 + 3)/4 = 15/4
3.75
3
(4 (4 x 3 + 3) + 3)/8 = 63/8
7.875
4
(4 (4 (4 x 3 + 3) + 3) + 3)/16 = 255/16
15.9375
5
(4 (4 (4 (4 x 3 + 3) + 3) + 3) + 3)/32 = 1023/32
31.96875
:
:
:
n
(4n - 1)/2n = 2n - 2-n
:
The length of the Hilbert curve of order n approaches infinity as n approaches infinity.
As n approaches infinity, we obtain the Hilbert space-filling curve, a continuous curve passing through every point of the enclosing square.