3 ms·
I don't think this has a stable "end" it can reach. Diagonals of pixels of the same x,y coordinates in linearly adjacent (green incrementation) cells would trig
by zamadatix 5y ago
I don't think this has a stable "end" it can reach. Diagonals of pixels of the same x,y coordinates in linearly adjacent (green incrementation) cells would trigger a swap as the diagonal is +-1 in both the red and blue channel but the same pixel offset in a different cell is +-1 only in the green channel. I can't think of any 2d arrangement where the difference of a pixel in a cell to all 8 of it's neighbors could be 1 for every pixel so this "sort" would really just cycle pixels around based on the order your random number generator happens to pick swappable diagonals by chance. As such it'd never converge and look like slowly adding distance capped noise over time. The seams between cells would only seek to increase the cap on this noise from 2 to 255. 255 being the minimal maximum distance I can imagine for a sorted grid of 2d pixels (i.e. I think this image is a min-max optimal ordering).
It'd also take a ridiculous number of iterations to really notice the noise being added. Perhaps unfeasibly many if you're wanting to go deep and truly rely on random comparisons.
- OscarCunningham 5y agoThe process would have to stop eventually, because each swap reduces the sum over all pixels of the distances to adjacent pixels, and there is no infinite descending sequence of positive whole numbers.