Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDX/Visualization: visualizing sorting algorithms #44

Open
jteresco opened this issue Aug 25, 2016 · 3 comments
Open

HDX/Visualization: visualizing sorting algorithms #44

jteresco opened this issue Aug 25, 2016 · 3 comments

Comments

@jteresco
Copy link
Contributor

Future enhancement idea: visualize sorting algorithms using waypoints. For example, we start by showing the waypoints in the order they're loaded (or have a button to randomize them) in the array. Also, color them on the map by their order (say, ranging from blue through the purples to red). Then as a sorting algorithm proceeds, we would show which waypoints are being compared, swapped, etc, and recolor them based on their new order in the array, and reorder them in the waypoint table as well.

@jteresco
Copy link
Contributor Author

The color scale from Mapview's number of travelers option might be a good choice here.

@jteresco
Copy link
Contributor Author

Could the SFC traversal code be useful here? Visualize as whatever order they are in, and watch the ordering and hence the color coding change as sorting proceeds? Would like to get thoughts from @LukeJennings1729 once summer 2022 work begins.

@LukeJennings1729
Copy link
Collaborator

I think it would be interesting. It has been a while since I've looked at the code, but I used this Rainbow library for the basis of how I used space filling curves where given a tuple of colors, you transition between each. For example the current code in Traversal Orderings, I believe it goes between red, a dull yellow, green, cyan, blue, magenta. Currently green/blue is colorwise overrepresented, so using it to show index might be a little confusing for points in the middle of the array. Also the question is how you even load in points. Like do you randomize it every time, and then try to return to the base ordering? The base ordering of waypoints from my understanding is pretty arbitrary. As such maybe basing the final form on something like one of the traversal orderings may be useful, but that could make things pretty confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants