Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bresenham's line algorithm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Line-drawing algorithm}} '''Bresenham's line algorithm''' is a [[line drawing algorithm]] that determines the points of an ''n''-dimensional [[raster graphics|raster]] that should be selected in order to form a close approximation to a [[straight line between two points]]. It is commonly used to draw [[line primitives]] in a [[bitmap image]] (e.g. on a [[computer screen]]), as it uses only integer addition, subtraction, and [[Bitwise operation|bit shifting]], all of which are very cheap operations in historically common computer architectures. It is an [[incremental error algorithm]], and one of the earliest algorithms developed in the field of [[computer graphics]]. An extension to the original algorithm called the ''[[midpoint circle algorithm]]'' may be used for drawing [[circles]]. While algorithms such as [[Xiaolin Wu's line algorithm|Wu's algorithm]] are also frequently used in modern computer graphics because they can support [[Spatial anti-aliasing|antialiasing]], Bresenham's line algorithm is still important because of its speed and simplicity. The algorithm is used in hardware such as [[plotter]]s and in the [[Graphics processing unit|graphics chips]] of modern [[graphics card]]s. It can also be found in many [[software]] [[graphics library|graphics libraries]]. Because the algorithm is very simple, it is often implemented in either the [[firmware]] or the [[graphics hardware]] of modern [[graphics card]]s. The label "Bresenham" is used today for a family of algorithms extending or modifying Bresenham's original algorithm.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)