siteIcon

Tech Novice Tools

JavaScript Apps

burgerIcon

Sorting Sagasort

Stage 3:
Super Sorter

Instructions

A StarField is a collection of ordered pairs in a canvas, arranged according to a particular type of generation: random placement, ascending, etc. Our sorting methods will place the stars in ascending order from left to right, and the process, when animated, will ilustrate each sorting algorithm's unique behavior.

When this app loads for the first time, a random collection of 100 stars is created. Once you have customized a design and saved it, it will stay in memory until you create and save another design.

To create a new StarField:
  1. Design the canvas and stars:
    • Canvas: Light or Dark Theme (Coming soon!)
    • Stars: Size and number
  2. Click the Apply button
    • The page will reload to accept the change, and load a default random-filled StarField
    • This StarField will not be persistent in memory until it is saved.
  3. Customize the StarField Generation:
    • Random
    • Ascending
    • Descending
    • Wave
    • Random Wave
  4. Add (Multiple) StarField Tweaking Options: These are tweaks that add a bit of special interest to your design, and may alter how the sorting process appears. Try them out! You may add as many as you like!
    • Center Jitter
    • Random Level
    • Random Ripple
  5. Save the StarField Design if desired.
    • Cookies are used to store some data
    • JSON is used to store larger groups of data (StarField values)
    • If you navigate away from the page, the information will be retained and reloaded to the canvas
  6. Clearing, Loading, Resetting
    • Clear Canvas will clear the canvas, but not persistent memory values
    • The 'Load' button will load currently-stored design into the canvas
    • 'Reset Defaults' will clear persistent memory and create a 100-star Random Fill Design and load it into the canvas, and save it to persistent memory
Using SuperSorter

With an established StarField handy:

  1. Open the SuperSorter Console Dropdown
  2. Select a desired sorting method
    • Note that for StarFields of 150 or more, the BubbleSort algorithms can be painfully slow; Only 'Shell Sort' is robust enough to tackle StarFields larger than about 10,000; If things get bogged down, the 'Stop Sorting' button will interrupt the process.
  3. While the process is 'active' you should see the stars rearranging based on the algorithm; once the process is finished, a summary of the event is listed under the graph
    • If you need to hit the brakes on the app, interrupt the process with the 'Stop Sorting' button.
  4. After the process finishes, the sort buttons are disabled. You can apply another sorting algorithm to the same StarField you had earlier. Just tap the 'Reset Sorting' button and the previous unsorted StarField will reload and you can then apply another sorting algorithm to it so you can compare the sorting algorithms, apples to apples.
  5. Of course you can always open the Design or Generation Consoles to adjust the number of stars and/or the configuration of the StarFields.

Last update: 12/20/19


StarField Design Console
Design your StarField:
Design your Stars and Canvas:

Note: this will reset existing designs

StarField Generation:
StarField Tweaks:
SuperSorter Console
SuperSorter Controls:
Sorting Algorithms:
Sorting Controls: