Anzeige

Hilbert Curve Calculator

Calculations at a Hilbert curve. The Hilbert curve is generated from a polygonal chain, following a construction rule involving an infinite number of iterations, similar to the Koch curve but more complicated. With each iteration, both the total length and the number of line segments increase. While a line is one-dimensional, the completed Hilbert curve is infinitely long and acts as a space-filling curve. It is therefore two-dimensional, completely filling a square. The completed Hilbert curve is continuous but nowhere differentiable. The intermediate stages in the construction of the Hilbert curve are known as Hilbert polygons, though they are not closed polygons, but rather one-dimensional polygonal chains. Here, you can calculate their length and the number of equal-length segments that compose them.
The individual stages are referred to as iterations. Enter the number of iterations and the edge length of the square to be filled. Choose the number of decimal places, then click Calculate.


David Hilbert Number of iterations (n): Hilbert polygon for n=2
Hilbert polygon for n=2.
Edge length square (s):
Hilbert polygon length (l):
Number of segments (k):
Segment length (m):
Round to    decimal places.



Formulas:

k=4n-1
m=s2n
l=k⋅m


Lengths have the same one-dimensional unit (e.g. meter). The numbers of iterations and segments are dimensionless and an integer.

The Hilbert curve is generated step-by-step through the repeated subdivision of a square. Initially, the square is divided into four equal-sized squares, and their centers are connected by straight line segments in a specific order, forming the first Hilbert polygon. For the next iteration, each of these four sub-squares is further divided into four smaller squares. The existing shape is replicated within the four sub-squares at a correspondingly smaller scale. Some of these reduced copies are rotated or mirrored to ensure the individual segments remain connected. This process is repeated in each subsequent iteration. With every iteration, the number of sub-squares quadruples, while the length of each individual line segment is halved.

The Hilbert curve was discovered by David Hilbert in 1891 as one of the first space-filling curves and was subsequently named after him. It can be used to arrange points within a square into a one-dimensional sequence by assigning each point a position based on its location along the curve. This allows two-dimensional spatial data to be stored and processed in a one-dimensional sequence without completely losing the spatial relationships between the points. Such an approach can be applied to databases, images, maps, and other large datasets containing spatial information.




Last updated on 09/11/2026.

© Jumk.de Webprojects | Online Calculators

Cite this page: Rechneronline (2026) - Hilbert Curve.
Retrieved on 2026-10-06 from https://rechneronline.de/pi/hilbert-curve.php




↑ up



Anzeige



Anzeige