diff README.md @ 32:b1a605eb721a

accept user inputs
author Dennis C. M. <dennis@denniscm.com>
date Thu, 29 Jun 2023 19:45:49 +0100
parents 61104b22a25d
children 576431310c8a
line wrap: on
line diff
--- a/README.md	Thu Jun 29 18:05:22 2023 +0100
+++ b/README.md	Thu Jun 29 19:45:49 2023 +0100
@@ -16,5 +16,55 @@
 cd build
 cmake ..
 make
-./algo_animator
+```
+
+**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**
+
+# Run
+
+To customize the program you can pass the following arguments. 
+
+```bash
+./algo_animator WINDOW_WIDTH WINDOW_HEIGHT RECTANGLE_WIDTH SPACE_BETWEEN_RECTANGLES
+```
+
+The default values are:
+
+```bash
+WINDOW_WIDTH = 1920
+WINDOW_HEIGHT = 1080
+RECTANGLE_WIDTH = 5
+SPACE_BETWEEN_RECTANGLES = 1
 ```
+
+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.
+
+```bash
+./algo_animator 1920 1080 50 3
+```
+
+![Image 3](repo/3.png)
+
+
+# Examples
+
+## Normal mode
+
+Just run the program and press `ENTER`
+
+## Slow motion
+
+Use `u` to increase the delay, then `ENTER` to run the algorithm   
+**The delay is applied after each iteration**
+
+## Pause mode
+
+Press `ENTER` then `p`
+
+## Sequential mode
+
+Press `q` then press `ENTER` to visualize the algorithm step by step.