Pencil charts for visualising colours

As a result of a discussion with a photographer friend of mine, I’ve been thinking (not for the first time) about visualising the colour palette of images. Consider this sunset, for example (a picture I took in Adelaide 8 years ago):

The photograph is rich in yellow and orange. However, the apparent blue in the sky is actually grey, and the apparent grey of the sea is actually brown. If we postulate a standard set of 35 plausible pencil colours, and map each pixel to the closest-matching pencil colour, we get this (I have done the comparison in RGB space):

Then we can visualise the colour palette of the image by showing the wear on the virtual pencils, if each virtual pencil has been used to colour the corresponding pixels. It can be seen that a lot of orange, brown, and grey was used (click to zoom):

Conversely, this beach scene (photographed in Vanuatu in 2016) is rich in blues:

The warm light greys of the beach don’t quite find an exact match among the pencils, but the other colours match fairly well:

And here is the pencil visualisation (click to zoom):

If, rather than using a standard set of colours, we extract the pencil colours from the image itself (image quantisation), fewer pencils will, of course, be required:

The fit to the original image will be much closer as well:

So this is a trick to remember for another day – pencil visualisations!


Sunset on a flat earth

Earlier, I wrote a post on why people know that the earth is round. Evidence such as star movement, the obscuring of distant objects by the earth’s curvature, and aircraft flight times shows that the earth is not flat:

In this post, I want to temporarily put on the “hat” of a flat-earther. They claim that the sun is a “spotlight” which travels across a circular flat earth like this:

That is at least a well-defined model, crazy though it might be, and therefore can be tested. Here is a computer render of the spring sun at sunset on that assumption (as seen from, say, San Francisco, at the moment that the sun disappears from view):

Three obvious problems with the flat-earth model are visible in this picture:

  • The sun is much too small: only 40% of its noontime diameter (because it is 2.5 times as far away as at noon)
  • The sun appears oval, rather than circular, because the “spotlight” is being seen obliquely (click to zoom if you can’t see the shape)
  • The sun is much too high in the sky (24° above the horizon)

In reality, of course, the sun at sunset is a circular disk that gradually slips under the horizon. Oops. No, the earth is not flat.