bright black and white art gallery

PixSorter

Watch algorithms sort pixels.

  • Quick Sort
  • Merge Sort
  • Bubble Sort
  • Insertion Sort
  • Selection Sort
  • Find the correct position of a pivot point in the pixel array (i.e. all values before are lower, all following are higher), then divide the array at that point. Repeat until the subarrays are so small that moving the pivot sorts them.

  • Find the correct position of a pivot point in the pixel array (i.e. all values before are lower, all following are higher), then divide the array at that point. Repeat until the subarrays are so small that moving the pivot sorts them.

  • Start at the beginning. Check if the next value in the pixel array is lower: if so, swap with the current pixel; if not, don't. Move to the next value until the largest number is last. Repeat, stopping one index earlier.

  • Iterate through the pixel array in reverse, swapping lower value pixels to their correct place at the start of the array. This creates a sorted section which grows with each loop through the pixel array.

  • Loop through the pixel array to find the lowest value and then move it into the first position. Find the next lowest and move it into position two. Repeat until reaching the end of the array.

  • RGB Total
  • Red
  • Green
  • Blue
  • Adding Red, Green & Blue pixel values

    combined pixel value image
  • Using the Red pixel value

    red pixel value image
  • Using the Green pixel value

    green pixel value image
  • Using the Blue pixel value

    blue pixel value image