Summer Hiatus

August 14, 2018

This is my tenth anniversary of blogging. I started back in 2008, and since then there has been 586 posts (including this one), about 1300 comments, 170 followers, 325000 visitors, and 825000 views, with a few posts well over 9000.

Well, that’s not bad, but for now, I must reconsider the time I invested, and will continue to invest in this blog. Posting once a week, even with the summer hiatuses, is becoming a strenuous pace, especially that I also have—many—other things to do. So I was tempted to just end it, and say, well, after ten years, it’s much better than your average two-post blog, let’s call it quits. But the thing is, I enjoy writing about the things I do, the math I work out, and other ideas. But I will likely stop for this month, then be back with once-a-month posting.

‘Till then, it’s summer. Let’s enjoy it.

Mœud deux

August 7, 2018

Pairing functions are fun. Last week, we had a look at the Cantor/Hopcroft and Ullman function, and this week, we’ll have a look at the Rosenberg-Strong function—and we’ll modify it a bit.

Read the rest of this entry »


July 31, 2018

Pairing functions are used to reversibly map a pair of number onto a single number—think of a number-theoretical version of std::pair. Cantor was the first (or so I think) to propose one such function. His goal wasn’t data compression but to show that there are as many rationals as natural numbers.

Cantor’s function associates pairs (i,j) with a single number:

…but that’s not the only way of doing this. A much more fun—and spatially coherent—is the boustrophedonic pairing function.

Read the rest of this entry »

The Well-Tempered Palette (Part 3)

July 24, 2018

This week, we’ll discuss a cool, but failed, experiment.

In the last few weeks (of posts, because in real time, I worked on that problem over a week-end) we’ve looked at how to generate well distributed, maximally different colors. The methods were to use well-distributed sequences or lattices to ensure that the colors are equidistant. What if we used physical analogies to push the colors around so that they are maximally apart?

Read the rest of this entry »

The Well-Tempered Palette (Part 2)

July 17, 2018

Last week, we’ve had a look at how to distribute maximally different colors on the RGB cube. But I also remarked that we could use some other color space, say HSV. How do we distribute colors uniformly in HSV space?

Read the rest of this entry »

The Well-Tempered Palette

July 10, 2018

When we use false color to encode useful information in an image, it helps greatly if the colors are meaningful in themselves (like a rainbow to encode heat) or maximally different when the image is segmented (like a map showing geologic provinces). But how do we chose those maximally different colors?

Somehow, we need a maximally distributed set of points in RGB space (but not necessarily RGB). We might have just what we need for this! We’ve discussed Halton sequences before. They’re a simple way of progressively and uniformly distribute points over an interval. The sequence starts by the ends of the interval then progressively fills the gaps. It generates the sequence 0, 1, 0.5, 0.25, 0.75, 0.125, 0.625, 0.375, 0.875, …

Read the rest of this entry »

HSV and HSL (colorpsaces XI)

July 3, 2018

HSV (hue, saturation, value) and HSL (hue, saturation, lightness) are two intuitive, but computationally cumbersome, colorspaces.

The basic idea behind these colorspaces is the good ol’ color wheel, where primary colors are placed on a triangle and secondary colors between; complementary colors are to be found opposite on the circle. That’s intuitive enough, but we still have to make it into a workable colorspace.

Read the rest of this entry »