Skip to content

Instantly share code, notes, and snippets.

View core1024's full-sized avatar

Владимир Борисов core1024

View GitHub Profile
@core1024
core1024 / README
Created July 23, 2018 22:15 — forked from bert/README
Bresenham Algorithms in C
Some possible implementations of the Bresenham Algorithms in C.
The Bresenham line algorithm is an algorithm which determines which points in an
n-dimensional raster should be plotted in order to form a close approximation
to a straight line between two given points.
It is commonly used to draw lines on a computer screen, as it uses only integer
addition, subtraction and bit shifting, all of which are very cheap operations
in standard computer architectures.
It is one of the earliest algorithms developed in the field of computer graphics.
A minor extension to the original algorithm also deals with drawing circles.