Get the latest tech news

Portrait of the Hilbert Curve (2010)


The Hilbert curve is a remarkable construct in many ways, but the thing that makes it useful in computer science is the fact that it has good clustering properties. If we take a curve like the one above and straighten it out, points that are close together in the two-dimensional layout will also tend to be close together in the linear sequence.

The Hilbert curve is a remarkable construct in many ways, but the thing that makes it useful in computer science is the fact that it has good clustering properties. I've long felt that the usual visualisation of the Hilbert curve - like the one shown at the top of this post - doesn't really do its clustering properties justice. This section is based on Hamilton's version of the classic algorithm first devised by A. R. Butz in the 1970s (though, see comments in my code for corrections to some minor errors in the paper that may trip up implementers).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of portrait

portrait

Photo of Hilbert Curve

Hilbert Curve

Related news:

News photo

A Man of Parts and Learning Fara Dabhoiwala on the Portrait of Francis Williams

News photo

Honor 200 Pro vs. Google Pixel 8 Pro: A portrait of two phones