News for hackers. Stuff that matters.
Re:Sorting Visualizations by afshinmeh on Saturday October 07, 2017 @09:06AM (#15423620)
I wonder how they created this visualization?
Re:Sorting Visualizations by Sharlin on Saturday October 07, 2017 @09:19AM (#15423654)
Create a two-dimensional array of width w and height h. Fill each row of the array with the numbers 1..w randomly shuffled. Pick a sorting algorithm, implement it so that you can run it one elementary sorting step at a time and observe the partial result. For each row in your array, execute a single step of your algorithm. Store the partial result as an image, with the elements of the array interpreted as the hue component of a HSL color coordinate. Repeat until the algorithm has halted for every row in the array. Make an animation out of the resulting frames.