Use arrow keys to change the number of partition lines These lines show where the space was partitioned during the QuickSort algorithm. Move the point P, around the outside of the shape to see how the line depth (indicated by colour: red = far, green = close) changes. You can also move the points by clicking and dragging.
This makes use of my depth comparison algorithm: https://scratch.mit.edu/projects/548009733/ It uses quicksort with my depth sort algorithm to essentially perform a kind of Binary Space partitioning algorithm. This took me almost 2 months as it making it was far from trivial and there were alot of bugs to fix. It's still not perfect and I will be trying to squash the few remaining bugs but it's good enough to demo.