https://github.com/liraymond04/olc-bresenham
Implementation of Bresenham's line algorithm for plotting curves.
https://github.com/liraymond04/olc-bresenham
algorithms bresenham-algorithm bresenham-circle-drawing-algorithm bresenham-line-drawing-algorithm c-plus-plus cpp curves olc olcpixelgameengine pge
Last synced: 8 months ago
JSON representation
Implementation of Bresenham's line algorithm for plotting curves.
- Host: GitHub
- URL: https://github.com/liraymond04/olc-bresenham
- Owner: liraymond04
- License: other
- Created: 2023-04-05T21:24:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-05T21:36:06.000Z (about 3 years ago)
- Last Synced: 2025-10-14T14:14:27.975Z (8 months ago)
- Topics: algorithms, bresenham-algorithm, bresenham-circle-drawing-algorithm, bresenham-line-drawing-algorithm, c-plus-plus, cpp, curves, olc, olcpixelgameengine, pge
- Language: C++
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# olc-bresenham
Implementation of [Bresenham's line algorithm](http://members.chello.at/~easyfilter/bresenham.html) for plotting curves.
Project using javidx9's [olcPixelGameEngine](https://github.com/OneLoneCoder/olcPixelGameEngine)
## Controls
| Button | Action |
| ----------- | ----------- |
| Escape | Quit |
| Left arrow | Previous curve |
| Right arrow | Next curve |
| Left click | Plot point |
| Backspace | Clear points |
## Building
Building is based on Moros1138's [pge-template-project](https://github.com/Moros1138/pge-template-project) CMake files
### Arch Linux
Install the required packages with the following command
`sudo pacman -Sy base-devel cmake git libpng mesa`
Generate project makefiles with CMake
`cmake .`
And build the project
`make`
### Windows
Install a C++ compiler like [MinGW](https://sourceforge.net/projects/mingw/)
Generate project makefiles with CMake
`cmake . -G "MinGW Makefiles"`
And build the project
`mingw32-make`