A GUI based Sorting Algorithm Visualizer using Python Tkinter Library.
The idea behind this project is to compare the performance
of different algorithms while also visualizing them.
Install Tkinter Library using pip
pip install tk
The program I developed contains all the necessary
features that satisfy the overall purpose of this project.
It is Interactive and has Graphical User Interface (GUI)
which makes it easy to use.
1. Ability to Select Desired Algorithms from Menu.
2. Ability to Select Desired File Containing the Data from Menu.
3. Ability to Select Speed of Sorting During Visualization.
4. After Selecting the Desired Options, User can Click on Buttons
to get the Desired Output.
5. User Can See the Data being Sorted in Real time in form of Blue Sticks,
Height of Stick represents the Size of the value.
6. When all Sticks turn Green then it means Array is Sorted.
7. After All the Data is Sorted then a New Window pops up,
Showing the Final Sorted Array.
8. User can also see Both Unsorted and Sorted Arrays printed on Console
-
Working of Buttons
-
"Generate Array from File" Button, Reads Data from the Selected file.
-
“Generate Random Array" Button, Creates Random Data after
Opening a new Dialog Box asking User to Enter Size of Data to be generated. -
“Sort" Button, Starts Sorting the Data from Selected Algorithm from Menu.
-
This program is developed in “Python Programming Language".
Python is both convenient and very popular language among
Scientists, Engineers and Programmers.
Python has many Libraries to Achieve Different Tasks.
For the GUI of this Program a library called “Tkinter" is used.
The Resources and Tools Used to Develop this Program,
* HardwareDevice Type : Laptop
CPU : Core i7 5th Gen
RAM : 12 GB DDR3
HDD : 500 GB, 7200 rpm
OS : Windows 10
Code Editor : VS Code
Interpreter : Python 3.11.0
In this Section, Basic GUI and Its Navigation will be shown in form of
Screenshots. Furthermore the Output and Results are also displayed.
-
Basic Look of the Interface
-
Drop-Down Menus
-
Canvas Showing Data Sticks
-
Canvas After Data is Sorted
-
Dialog Box for User Input
-
Output Window
-
Console Window
This Program can be beneficial for academic purposes and can help
students understand both the working and complexity of these
commonly used algorithms. It is user friendly and easy to work with.
Official Tkinter Documentation:
https://docs.python.org/3/library/tk.html
Official Python 3.11.0 Documentation:
Fundamentals of Algorithms by GeeksforGeeks: