HilbertCurve

HilbertCurve[n]

gives the line segments representing the n^(th)-step Hilbert curve.

HilbertCurve[n,d]

gives the n^(th)-step Hilbert curve in dimension d.

Details and Options

  • HilbertCurve is also known as Hilbert space-filling curve.
  • HilbertCurve[n] returns a Line primitive corresponding to a path that starts at {0,0}, then joins all integer points in the 2n-1 by 2n-1 square, and ends at {2n-1,0}.  »
  • HilbertCurve takes a DataRange option that can be used to specify the range the coordinates should be assumed to occupy.

Examples

open allclose all

Basic Examples  (2)

A 2D Hilbert curve:

In[1]:=
Click for copyable input
Out[1]=

Lengths of the approximations to the Hilbert curve:

In[2]:=
Click for copyable input
Out[2]=

The formula:

In[3]:=
Click for copyable input
Out[3]=

Visualize the Hilbert curve in 2D with splines:

In[1]:=
Click for copyable input
Out[1]=

Scope  (8)

Generalizations & Extensions  (2)

Options  (1)

Applications  (4)

Properties & Relations  (3)

Possible Issues  (2)

Neat Examples  (1)

See Also

PeanoCurve  SierpinskiCurve  KochCurve  AnglePath  SubstitutionSystem

Introduced in 2017
(11.1)