From 4f0ed144e6ab2ea1d2e346a876e3bd87128f5fab Mon Sep 17 00:00:00 2001 From: Sina Ghaderi <32870524+Sina-Ghaderi@users.noreply.github.com> Date: Fri, 28 Oct 2022 02:35:15 +0330 Subject: adding readme --- Readme.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..7ebce9e --- /dev/null +++ b/Readme.md @@ -0,0 +1,44 @@ +# brline +simple bresenham line drawing algorithm demonstration implemented with golang, +this was my last week lesson in computer graphics class with Dr. Behzad Zamani + +### how to compile +in order to compile and run this project you need to install [go compiler](https://go.dev/dl), +after that run `go build` in project directory to compile brline binary + +``` +# git clone https://git.snix.ir/brline +# cd brline && go build +# ./brline +``` + +### how to use +use `./brline --help` to print help banner, you need to provide 2 points as start and end of the line +each point has x and y coordinate, so for starting point you should use -xa and -ya flags and for ending point -xb and -yb + +``` +# ./brline --help +usage of bresenham line simulator: +./brline options... + +options: + --pt named png file to save bresenham output + default path for this file is br_resualt.png + + --xa x coordinate of starting point + --xb x coordinate of ending point + + --ya y coordinate of starting point + --yb y coordinate of ending point + +example: + ./brline --pt mytest.png --xa 8 --ya 3 --xb 2 --yb 10 + + +Copyright (c) 2022 snix.ir, All rights reserved. +Developed BY sina@snix.ir +This work is licensed under the terms of GNU General Public license. +Github: github.com/sina-ghaderi and Source: git.snix.ir +``` + + -- cgit v1.2.3