Monday, 2017 July 3, 19:43 — eye-candy, mathematics

mutant dragons

In 2007 I thought of a pretty way to paint a square so that all pixels are different, but similar colors are clustered. For each pixel, set x,y to its coordinates; if their sum is odd, set the low bit of one of the color channels to 1. Replace x,y with (-x+y)>>1, (-x-y)>>1; this has the effect of rotating the grid by 3/8 turn and shrinking it by a factor of √2, so that the former even points, which formed a larger oblique grid, now fall on the original grid, and the odd points have their new half-coordinates truncated away. Repeat until a bit has been assigned to each bit of the three color channels.

(More concisely: considering the pixel’s coordinates as a complex number, express it as a bit string in base (-1+i).)

Colors that match in their higher bits form twindragon fractals, thus:

In 2012, I thought: what if the rotation alternates clockwise and counterclockwise?

A bit on the boring side.

But in 2017, I thought: what about less trivial sequences? ( . . more . . )

Thursday, 2016 June 16, 00:20 — eye-candy, neep-neep

fun with colors

Here, have a couple of Python scripts. Each creates an image file, 2^12 pixels square, each pixel of a different color. puts the coordinates of each pixel in Gray code, assigns each bit to one of the color channels, and converts each channel back from Gray code to choose a color. The assignment is chosen at random from 141926400 possibilities. is my attempt to re-create and extend this: it folds the square eight times to make a cube fitting the color space. The interesting part was maintaining continuity through multiple folds. This one has only 107520 possible outcomes; again they’re chosen at random. I don’t like the result nearly as much as the other, but you might!

You’ll need Python Imaging Library.

On my machine each takes less than two minutes, so with a simple shell script you can whip up hundreds overnight.

( . . more . . )

Saturday, 2013 November 16, 18:09 — Cascadia, eye-candy, mathematics

as many as it takes

allRGB: images in which each of 16 million colors occurs exactly once. (Found at MathPuzzle.) I see I’m not the only one to think of the Hilbert curve idea, but I’ll post two others.

In unrelated news, I was surprised today to find some late blackberries, bland but wholesome.

Monday, 2011 February 21, 14:32 — eye-candy, mathematics

i got tired of looking at grey ribbons

Saturday, 2011 February 12, 22:06 — eye-candy, mathematics

more chainmail

This image, which I made a few years ago, is based on a tiling of the hyperbolic plane with triangles whose angles are π/2, π/3, π/7. Other than the 7, which can be changed to any higher integer, I couldn’t vary these numbers without ruining the effect. Recently I thought of a simpler, and thus more general, way to generate the ribbons.

( . . more . . )

Friday, 2010 January 29, 13:33 — eye-candy, mathematics

if MCE were alive

My strip representation of the hyperbolic plane inspired Vladimir Bulatov to explore weirder conformal mappings thereof. (Conformal means angles are preserved.)

Wednesday, 2008 December 3, 11:00 — eye-candy, mathematics

Hilbert’s palette

A space-filling path through this square is matched to an analogous path through the color-cube.

I had this idea in mind for years but the algorithm for Hilbert’s curve defeated me; then I stumbled on Steve Witham’s Python code, and whipped up this doodle in half an hour.

Next Page »