Content deleted Content added
correct variables v1,v2 which should be y1,y2, and fix indentation to use tabs consistently |
Phil Boswell (talk | contribs) AWB assisted migrate {{journal reference}} to {{cite journal}} |
||
Line 1:
'''Xiaolin Wu's line algorithm''' is an [[algorithm]] for line [[antialiasing]], which was presented in the article ''An Efficient Antialiasing Technique'' in the [[July]] [[1991]] issue of ''[[Computer Graphics]]'', as well as in the article ''Fast Antialiasing'' in the [[June]] [[1992]] issue of ''[[Dr. Dobb's Journal]]''.
[[Bresenham's line algorithm|Bresenham's algorithm]] draws lines extremely quickly, but it cannot perform anti-aliasing. In addition, it cannot handle the case where the line endpoints do not lie exactly on integer points of the pixel grid. A
Here is [[pseudocode]] for the nearly-horizontal case (<math>\Delta x > \Delta y</math>). To extend the algorithm to work for all lines, swap the x and y coordinates when near-vertical lines appear (for reference, see [[Bresenham's line algorithm]]).
Line 55:
==References==
* {{cite journal
| author=Abrash, Michael
| url = http://www.gamedev.net/reference/articles/article382.asp
| title = Fast Antialiasing (Column)
| journal=[[Dr. Dobb's Journal]]
| year=June 1992 | volume=17 | issue=6 | pages=139(7)
}}
* {{cite journal
| author=Wu, Xiaolin
| url = http://portal.acm.org/citation.cfm?id=122734
| title = An efficient antialiasing technique
| journal=[[Computer Graphics]]
| year=July 1991 | volume=25 | issue=4 | pages=143–152
| id = ISBN 0-89791-436-8
}}
* {{Book reference
| Author = Wu, Xiaolin
| Year = 1991
| Chapter = Fast Anti-Aliased Circle Generation
| Editor = James Arvo (Ed.)
| Title = Graphics Gems II
| Pages = pp. 446–?
| Location = San Francisco
| Publisher = Morgan Kaufmann
| ID = ISBN 0-12-064480-0
}}
==External links==
|