sorting the pixels within a photograph results in some cool effects. Here each vertical column of pixels is sorted by hue

#MathGIF #DataViz

@matthen2 I would have expected that to look interesting, but I'm surprised at how beautiful it looks
@robinhouston cool textured look at the end!
@matthen2 did you use bubble sort?
@BernhardWerner just swapped adjacent pixels if they are out of order until it converged, since that can be implemented efficiently in a shader
@matthen2 In serial fashion or randomly? Serially that's exactly bubble sort. :-)
@sstadnicki in parallel, comparing odd and even consecutive pairs in alternating timesteps- so I guess a little different
@matthen2 Ahhh, neat! In that case probably some sort of variant on a shell sort.
Odd–even sort - Wikipedia

@matthen2 @sstadnicki would you be willing to share the code?
@matthen2 @sstadnicki
Reminds me of Block Cellular Automata
https://youtu.be/idgt3gLnwk8
But in 1D columns and using more than 2 values
Conway's Game of Life Glider found in Block Cellular Automatons

YouTube