ArticleslgStudy

science

Hilbert curve

Hilbert curve is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hilbert curve rather than just read about it. In short: The Hilbert curve (also known as the Hilbert space-filling curve) is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891, as a variant of the space-filling Peano curves discovered by Giuseppe Peano in 1890. Because it is space-filling, its Hausdorff dimension is 2 (precisely, its image is the unit square, whose dimension is 2 in any definition of dimension; its…

Hilbert curve — main illustration
Hilbert curve — illustration

Key takeaways

  • Hilbert curve belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hilbert curve to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hilbert curve from memory before moving on to harder problems.

Reference excerpt

The Hilbert curve (also known as the Hilbert space-filling curve) is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891, as a variant of the space-filling Peano curves discovered by Giuseppe Peano in 1890. Because it is space-filling, its Hausdorff dimension is 2 (precisely, its image is the unit square, whose dimension is 2 in any definition of dimension; its graph is a compact set homeomorphic to the closed unit interval, with Hausdorff dimension 1). The Hilbert curve is constructed as a limit of piecewise linear curves. The length of the n {\displaystyle n} th curve is 2 n − 1 2 n {\displaystyle \textstyle 2^{n}-{1 \over 2^{n}}} , i.e., the length grows exponentially with n {\displaystyle n} , even though each curve is contained in a square with area 1 {\displaystyle 1} .

Images

Applications and mapping algorithms Both the true Hilbert curve and its discrete approximations are useful because they give a mapping between 1D and 2D space that preserves locality fairly well. This means that two data points which are close to each other in one-dimensional space are also close to each other after folding. The converse is not always true. Because of this locality property, the Hilbert curve is widely used in computer science. For example, the range of IP addresses used by computers can be mapped into a picture using the Hilbert curve. Code to generate the image would map from 2D to 1D to find the color of each pixel, and the Hilbert curve is sometimes used because it keeps nearby IP addresses close to each other in the picture. The locality property of the Hilbert curve has also been used to design algorithms for exploring regions with mobile robots and indexing geospatial location data. In an algorithm called Riemersma dithering, grayscale photographs can be converted to a dithered black-and-white image using thresholding, with the leftover amount from each pixel added to the next pixel along the Hilbert curve. Code to do this would map from 1D to 2D, and the Hilbert curve is sometimes used because it does not create the distracting patterns that would be visible to the eye if the order were simply left to right across each row of pixels. Hilbert curves in higher dimensions are an instance of a generalization of Gray codes, and are sometimes used for similar purposes, for similar reasons. For multidimensional databases, Hilbert order has been proposed to be used instead of Z order because it has better locality-preserving behavior. For example, Hilbert curves have been used to compress and accelerate R-tree indexes (see Hilbert R-tree). They have also been used to help compress data warehouses. The linear distance of any point along the curve can be converted to coordinates in n dimensions for a given n, and vice versa, using any of several standard mathematical techniques such as Skilling's method. It is possible to implement Hilbert curves efficiently even when the data space does not form a square. Moreover, there are several possible generalizations of Hilbert curves to higher dimensions.

Representation as Lindenmayer system The Hilbert Curve can be expressed by a rewrite system (L-system).

Alphabet : A, B Constants : F + − Axiom : A Production rules: A → +BF−AFA−FB+ B → −AF+BFB+FA− Here, "F" means "draw forward", "+" means "turn left 90°", "-" means "turn right 90°" (see turtle graphics), and "A" and "B" are ignored during drawing.

Other implementations The Hilbert Curve is commonly used among rendering images or videos. Common programs such as Blender and Cinema 4D use the Hilbert Curve to trace the objects, and render the scene. The slicer software used to convert 3D models into toolpaths for a 3D printer typically has the Hilbert curve as an option for an infill pattern.

See also

Hilbert curve scheduling Hilbert R-tree Locality of reference Locality-sensitive hashing Moore curve Murray polygon Sierpiński curve List of fractals by Hausdorff dimension

Notes

Further reading Warren Jr., Henry S. (2013). Hacker's Delight (2 ed.). Addison Wesley – Pearson Education, Inc. ISBN 978-0-321-84268-8. McKenna, Douglas M. (2019). Hilbert Curves: Outside-In and Inside-Gone. Mathemaesthetics, Inc. ISBN 978-1-7332188-0-1.

External links Dynamic Hilbert curve with JSXGraph Dynamic Hilbert Fractal Curve by Edward Bole (Lazarus src) Three.js WebGL 3D Hilbert curve demo XKCD cartoon using the locality properties of the Hilbert curve to create a "map of the internet" Gcode generator for Hilbert curve Archived 2019-07-09 at the Wayback Machine Iterative implementation of Hilbert curve in JavaScript Algorithm 781: generating Hilbert's space-filling curve by recursion (ACM Digital Library)

Illustrations

Hilbert curve: First seven iterations of the Hilbert curve
First seven iterations of the Hilbert curve
Hilbert curve illustration
Hilbert curve illustration
Hilbert curve illustration
Hilbert curve illustration

Worked examples

Example 1 — a first encounter with Hilbert curve

Start with the simplest possible case. Write down what Hilbert curve claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hilbert curve before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hilbert curve ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hilbert curve

In research
Hilbert curve appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hilbert curve in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hilbert curve is common in secondary-school and first-year university syllabi. It links to neighbouring topics David Hilbert, Fractal curves, so understanding it makes those chapters shorter.
In everyday life
Look for Hilbert curve outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Hilbert curve” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Hilbert curve in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hilbert curve means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hilbert curve out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hilbert curve in simple terms?

The Hilbert curve (also known as the Hilbert space-filling curve) is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891, as a variant of the space-filling Peano curves discovered by Giuseppe Peano in 1890. Because it is space-filling, its Haus…

Why does Hilbert curve matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hilbert curve?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hilbert curve.

Tags

  • David Hilbert
  • Fractal curves

Keep exploring