Back to Viz overview

Viz 3

All the pixels.

This visualization is built from the ground up. On every frame a random set of pixels is chosen. Each chosen pixel calculates the average of its color and the color of a random neighbor. Some random color drift is added in as well. It replaces its own color with that calculated color.

Choosing a neighbor is done using the "asteroid rule", ie a pixel at the very top row is considered to be the neighbor of the pixel on the bottom row of the same column.

Without the asteroid rule the pixels would all eventually converge into a single uniform color, generally a light blue, due to the colors at the edge, the reds, being quickly averaged away. With the asteroid rule in place the canvas has no edges, thus no position on the canvas is favored and balance can be maintained.


Published 2020-07-07


Hi! My name is Brian and I'm available for short-term remote contract work. Whether you need a consultant to guide you through a difficult problem or another pair of hands to smash out some code, I can do it all. Learn more about me and my skillset by browsing around this site, head over to my resume to find my actual work history, and shoot me an email when you're ready to get in touch.