siteIcon

Tech Novice Tools

JavaScript Apps

burgerIcon

Sorting Sagasort

Stage 2:
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 the sorting algorithm.

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-fill StarField)
  3. Design the StarField Generation:
    • Random
    • Ascending
    • Descending
    • Wave
    • Random Wave
  4. Add (Multiple) StarField Tweaking Options:
    • Center Jitter
    • Random Level
    • Random Ripple
  5. Save the StarField Design
    • 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; you may have restart the page to start over until we get a 'Stop' button
  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
    • While the sorting process is active, be careful not to tap other sort buttons or the reset button; unexpected things may happen. Future stages will address this issue.
    • At this time, if you need to hit the brakes on the app, just reload the page
  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/19/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: