Categories

(((x+y) XOR abs(x-y)) ** 7) modulo 257

☆☆☆☆☆ No ratings yet

algorithm:
for each x position:
  for each y position:
    color = (((x+y) XOR abs(x-y)) ** 7) modulo 257

Then start scrolling the screen, by shifting it and rendering new pixels on the edges. You can scroll this thing indefinitely; it never runs out of shapes.

notes:
the XOR is binary
** means 'to the power of'
since it's modulo 257, you'll get values of 0-256, while indexed color only has values 0-255. values of 256 therefore have to be converted to something else. I use 255; the original author used values of 0.

I find that a single color with a brightness gradient works well, ibm 256-color palette doesn't. i tried all the basic colors, and orange seems to go best.