A fast and simple blog backend.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
mediocre-blog/src/_posts/2020-07-07-viz-3.md

4.3 KiB

title description series
Visualization 3 All the pixels. viz

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.