Press space bar to swap between selection sort and merge sort. Press h to hide stuff and s to show stuff. Tilt the axes by changing the angles.
The circles/polygons are made up of line segments between two vertices. In each step, the vertices are sorted so that line segments that lie far from the observer are drawn first. This way to render 3D is called the Painter's algorithm. When the number of vertices is low, both selection sort and merge sort work well. As the number of vertices increases, selection sort takes considerably longer time than merge sort, thus making the animation less smooth. Selection sort takes O(n²) time. Merge sort takes O(nlog(n)) time. Wikipedia - Gimbal: http://en.wikipedia.org/wiki/Gimbal Wikipedia - Sorting algorithm: http://en.wikipedia.org/wiki/Sorting_algorithm Wikipedia - Painter's algorithm: https://en.wikipedia.org/wiki/Painter%27s_algorithm Wikipedia - Big O notation: http://en.wikipedia.org/wiki/Big_O_notation