45
|
1
|
|
2 # algo-animator
|
|
3
|
|
4 An interactive program to visualize sorting algorithms. Developed in C using OpenGL, GLUT and FreeType. I also made a video about this project -> [Youtube](https://youtu.be/KvOI88s-FsU).
|
47
|
5
|
|
6 This project is inspired by the video of Timo Bingmann called [15 sorting algorithms in 6 minutes](https://www.youtube.com/watch?v=kPRA0W1kECg)
|
|
7
|
|
8 ## Usage
|
|
9
|
|
10 ### Compile
|
|
11
|
|
12 mkdir build
|
|
13 cd build
|
|
14 cmake ..
|
|
15 make
|
|
16
|
|
17 Currently I've only tested this project on Linux. However, I would like to prepare it so that it can be used on Mac and Windows. However, my cross-platform experience is almost non-existent. Maybe in the future I'll check how to do it.
|
|
18
|
|
19 ### Run
|
|
20
|
|
21 To customize the program you can pass the following arguments.
|
|
22
|
|
23 ./algo_animator WINDOW_WIDTH WINDOW_HEIGHT RECTANGLE_WIDTH SPACE_BETWEEN_RECTANGLES
|
|
24
|
|
25 The default values are:
|
|
26
|
|
27 WINDOW_WIDTH = 1920
|
|
28 WINDOW_HEIGHT = 1080
|
|
29 RECTANGLE_WIDTH = 5
|
|
30 SPACE_BETWEEN_RECTANGLES = 1
|
|
31
|
|
32 Run the program in a window with width of 1920 pixels and height of 1080 pixels, fit the screen with rectangles with width of 50 pixels, and add a space between rectangles of 3 pixels.
|
|
33
|
|
34 ./algo_animator 1920 1080 50 3
|
|
35
|
|
36 # Notes
|
|
37
|
|
38 This project has not been designed to compare the speed of the algorithms side by side. The main objective is the visualization of the algorithms for educational purposes.
|
|
39
|
|
40
|