Bresenham's Line Algorithm

Bresenham's Line Algorithm

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.

While algorithms such as Wu's algorithm are also frequently used in modern computer graphics because they can support antialiasing, the speed and simplicity of Bresenham's line algorithm means that it is still important. The algorithm is used in hardware such as plotters and in the graphics chips of modern graphics cards. It can also be found in many software graphics libraries. Because the algorithm is very simple, it is often implemented in either the firmware or the graphics hardware of modern graphics cards.

The label "Bresenham" is used today for a whole family of algorithms extending or modifying Bresenham's original algorithm. See further references below.

Read more about Bresenham's Line Algorithm:  History, The Algorithm, Derivation, Similar Algorithms

Famous quotes containing the word line:

    I had crossed de line of which I had so long been dreaming. I was free; but dere was no one to welcome me to de land of freedom. I was a stranger in a strange land, and my home after all was down in de old cabin quarter, wid de ole folks, and my brudders and sisters. But to dis solemn resolution I came; I was free, and dey should be free also; I would make a home for dem in de North, and de Lord helping me, I would bring dem all dere.
    Harriet Tubman (c. 1820–1913)