45
|
1
|
|
2 # Table of Contents
|
|
3
|
|
4 1. [Compile](#org5155f5d)
|
|
5 2. [Run](#org4284749)
|
|
6 3. [Notes](#orgfd96d06)
|
|
7
|
|
8 This project is inspired by the video of Timo Bingmann called [15 sorting algorithms in 6 minutes](https://www.youtube.com/watch?v=kPRA0W1kECg).
|
|
9
|
|
10 
|
|
11
|
|
12 
|
|
13
|
|
14
|
|
15 <a id="org5155f5d"></a>
|
|
16
|
|
17 # Compile
|
|
18
|
|
19 mkdir build
|
|
20 cd build
|
|
21 cmake ..
|
|
22 make
|
|
23
|
|
24 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.
|
|
25
|
|
26
|
|
27 <a id="org4284749"></a>
|
|
28
|
|
29 # Run
|
|
30
|
|
31 To customize the program you can pass the following arguments.
|
|
32
|
|
33 ./algo_animator WINDOW_WIDTH WINDOW_HEIGHT RECTANGLE_WIDTH SPACE_BETWEEN_RECTANGLES
|
|
34
|
|
35 The default values are:
|
|
36
|
|
37 WINDOW_WIDTH = 1920
|
|
38 WINDOW_HEIGHT = 1080
|
|
39 RECTANGLE_WIDTH = 5
|
|
40 SPACE_BETWEEN_RECTANGLES = 1
|
|
41
|
|
42 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.
|
|
43
|
|
44 ./algo_animator 1920 1080 50 3
|
|
45
|
|
46 
|
|
47
|
|
48
|
|
49 <a id="orgfd96d06"></a>
|
|
50
|
|
51 # Notes
|
|
52
|
|
53 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.
|
|
54
|