image experiments
here are a few image experiments i made, ordered by how i like their looks.
exp1
exp1 generates random "pixel-art" images with intricate patterns. you can actually generate such images on a tiny website i made.
the algorithm is rather simple :
- generate a palette of 8 colors
- fill an image at random with colors from the palette
- for each pixel of the image, compute the average color within a 65x65 neighborhood, then replace the pixel's color with the one that is the farthest from the average within a 49x49 area around it
exp6
exp6 generates escape-time "arithmetic fractals" of which the iterated formula uses gcds.
the idea is to iterate a function of two integer variables (with starting value equal to 0) for each pixel of the screen and have the x and y coordinates of the current pixel influence the output. then we count how many iterations are needed for the iterated value to escape a certain domain and use this to color the pixel.
my favorites are 2, 4 and 5.
exp3
exp3 is a colored plot of the greatest common divisors of pairs of integers. the white lines extending from the diagonal correspond to prime numbers, they illustrate how primes are numbers only divisible by one and themselves.
exp5
exp5 is a plot supposed to reveal collatz-like sequences with long cycle length independently of the starting value.
the idea is to compute, for each pixel of coordinates (x, y), the cycle length of the sequence defined by un+1 = x un + y if un is even else un/2. this is computed with a starting value of 0, 1, ..., 99 and then summed to highlight sequences that yield high cycle lengths for a lot of starting values. just so you know, the pixel at the top-left corner has coordinates (0, 0).
(click for clearer image)
exp2
exp2 starts from a random image and takes random walks from each pixel until it finds the starting pixel color and then color the path taken using this color.