This image is constructed by traversing the 2D image space in parallel with the 3D RGB colour space, in order to assign at each step a unique colour to a unique pixel.
The traversal is driven by the greedy algorithm (https://en.wikipedia.org/wiki/Greedy_algorithm) and randomness when choosing among equally near neighbours.
Visually, the traversal proceeds along a continuous contorted path through adjacent neighbours, until it reaches a dead end, at which point a jump occurs to the nearest location from where the next path can start.
Algorithm Outline:
- Select a pixel (e.g. a pixel at the centre of the image).
- Select a colour (e.g. the colour white).
- Assign the selected colour to the selected pixel.
- Finish when all pixels have been assigned a colour.
- From the remaining pixels select a pixel that's closest to the last selected pixel; if there is more than one closest pixel, then select one of them at random.
- From the remaining colours select a colour that's closest to the last selected colour; if there is more than one closest colour, then select one of them at random.
- Repeat from 3.
Image Licence: Public Domain (CC0).