annotate README.md @ 51:8a9a7d020197

Update algorithms.h Added function prototype for merge sort committer: GitHub <noreply@github.com>
author Pietro Molendys <89810437+Pedritos22@users.noreply.github.com>
date Wed, 02 Apr 2025 01:12:40 +0200
parents 10a7b0e258f4
children 2016dc709c7b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45
08ec3e96a02c Change info files
Dennis <dennis@denniscm.com>
parents:
diff changeset
1
08ec3e96a02c Change info files
Dennis <dennis@denniscm.com>
parents:
diff changeset
2 # algo-animator
08ec3e96a02c Change info files
Dennis <dennis@denniscm.com>
parents:
diff changeset
3
08ec3e96a02c Change info files
Dennis <dennis@denniscm.com>
parents:
diff changeset
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
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
5
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
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)
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
7
48
10a7b0e258f4 Add images to readme
Dennis C. M. <dennis@denniscm.com>
parents: 47
diff changeset
8 ![alt text](.github/1.png)
10a7b0e258f4 Add images to readme
Dennis C. M. <dennis@denniscm.com>
parents: 47
diff changeset
9 ![alt text](.github/2.png)
10a7b0e258f4 Add images to readme
Dennis C. M. <dennis@denniscm.com>
parents: 47
diff changeset
10
47
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
11 ## Usage
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
12
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
13 ### Compile
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
14
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
15 mkdir build
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
16 cd build
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
17 cmake ..
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
18 make
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
19
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
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.
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
21
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
22 ### Run
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
23
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
24 To customize the program you can pass the following arguments.
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
25
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
26 ./algo_animator WINDOW_WIDTH WINDOW_HEIGHT RECTANGLE_WIDTH SPACE_BETWEEN_RECTANGLES
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
27
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
28 The default values are:
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
29
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
30 WINDOW_WIDTH = 1920
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
31 WINDOW_HEIGHT = 1080
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
32 RECTANGLE_WIDTH = 5
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
33 SPACE_BETWEEN_RECTANGLES = 1
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
34
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
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.
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
36
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
37 ./algo_animator 1920 1080 50 3
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
38
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
39 # Notes
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
40
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
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.
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
42
f60144ebce23 Fix build for mac
Dennis C. M. <dennis@denniscm.com>
parents: 46
diff changeset
43