Sorting
This is a program to show how different sorting algorithums work, and how they get to the end result.
It makes good use of both my graphics library and GUI library, include loading the GUI from a xml file.
The slider in the corner is used to changed the scale of centre view.
The middle text box can be used to add values to the collection, and middle mouse button removes bars.
Bars can be swapped by clicking on them, or by the buttons at the top.
I was planning to add a button for merge sort, but have not got round to this as it would involve rewriting the animation code to support moving 2 objects at once.
The control scheme:
R - Reload GUI;
DEL - Delete currently selected bar element;
Scroll - Change value of bar at mouse position;
Source code
Download binaries:
Windows,
Linux
Binary Search Tree
This is a program to show the structure of a binary search tree as nodes are added and removed.
It also makes use of my graphics library and GUI library, and loads the GUI layout from an xml file.
The text box at the top is the value used for all the button functions.
The node hgihlights orange when it is found by the find function.
The control scheme:
Enter - Add entered node;
DEL - Remove entered node;
Ctrl + F - Find entered node;
Ctrl + R - Add a random node;
Arrow keys - Pan view;
Scroll (Shift) - Pan view;
Ctrl Scroll - Change zoom;
Ctrl + =/- - Increase/decrease zoom;
Source code
Download binaries:
Windows,
Linux
Mandelbrot Set
This is a simple mandelbrot set renderer that uses the GPU to perform the calculations.
It has the classic histogram colouring, which is currently done single threaded on the CPU due to needing shared write data.
I took the main implementation of the histogram from a stackoverflow user answering this question.
Without the histogram rendering, the visual is the raw output of the GPU processing which is the iteration count encoded into the colour.
The images shown are the same spot with and without histogram respectively.
In the corner of the screen are displayed the max iterations, the current zoom and the current frame time in seconds.
On my computer, I can roughly get maximum zoom of 2×1014 before the resultion clearly degrades.
I expect this is due to the precision of the double so I doubt any other graphics card could go any higher.
The control scheme:
Esc - Close program;
BSP - Animate back to centre with no zoom;
Alt + BSP - Animate just zooming out;
H - Toggle histogram processing;
R - Match rendering size to window size;
=/- - Increase/decrease base max iterations;
Shift - Zoom/animate at 2 * speed;
Left Mouse - Pan view;
Middle Mouse - Smoothly zoom;
Scroll - Zoom;
Source code
Download binaries:
Windows,
Linux