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
|
48
|
8 
|
|
9 
|
|
10
|
47
|
11 ## Usage
|
|
12
|
|
13 ### Compile
|
|
14
|
|
15 mkdir build
|
|
16 cd build
|
|
17 cmake ..
|
|
18 make
|
|
19
|
|
20 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.
|
|
21
|
|
22 ### Run
|
|
23
|
|
24 To customize the program you can pass the following arguments.
|
|
25
|
|
26 ./algo_animator WINDOW_WIDTH WINDOW_HEIGHT RECTANGLE_WIDTH SPACE_BETWEEN_RECTANGLES
|
|
27
|
|
28 The default values are:
|
|
29
|
|
30 WINDOW_WIDTH = 1920
|
|
31 WINDOW_HEIGHT = 1080
|
|
32 RECTANGLE_WIDTH = 5
|
|
33 SPACE_BETWEEN_RECTANGLES = 1
|
|
34
|
|
35 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.
|
|
36
|
|
37 ./algo_animator 1920 1080 50 3
|
|
38
|
|
39 # Notes
|
|
40
|
|
41 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.
|
|
42
|
|
43
|