hilbert curve.
2022-12-11

As mentioned in the new site, who dis. blog post, this site is an infinite grid, with each page on the site being a panel on that grid. This raises the question, how do I decide where on the grid to place new pages?

Being an infinite grid, there are an infinite number of options! For example, we could just go off in an arbitrary direction:

··············
··█───────────
··············

But that doesn't really take advantage of the dimensionality of the grid. Instead, we could spiral around a point:

┌─────┐
│┌───┐│
││┌─┐││
│││█│││
│││└┘││
││└──┘│
│└────┘

Or we could use the Cantor Pairing Function or even pick randomly!

So, what did I go with? Well, for blog posts, I decided to use the Hilbert curve, a space filling fractal, since it has some nice properties.

█·······
│┌─x┌─┐┌
└┘┌┘└┐└┘
┌┐└┐┌┘┌┐
│└─┘└─┘│
└┐┌──┐┌┘
┌┘└┐┌┘└┐
│┌┐││┌┐│
└┘└┘└┘└┘

This blog post is at 'x' on the curve.

If you get lost navigating the grid, you can always grab a map to check your position.