Monday, July 04, 2016

[vuqzjhmd] Heptagon

rainbow heptagon

Rainbow-shaded regular heptagon.  The source code below draws it in two different ways. It is unfortunate that the JuicyPixels Codec.Picture generateImage mapPixels encodePng pipeline (implemented in the function heptagonpic) is not lazy.  A 32000 by 32000 image ran out of memory.  The alternative route, outputting a Netpbm PPM (implemented in the function heptagon) then piping standard output to pnmtopng worked just fine.

There is a curious optical illusion of radial spikes, especially in the red and cyan.

Source code in Haskell.

1 comment :

Anonymous said...

Are these spikes really an optical illusion? If I zoom on one of them, I can still see it, while the heptagon isn't visible any more. I haven't checked the exact colors of the pixels, though.