Lines less than one pixel long are handled as a special case.Īn extension to the algorithm for circle drawing was presented by Xiaolin Wu in the book Graphics Gems II. Pixels at the line ends are handled separately. The algorithm consists of drawing pairs of pixels straddling the line, each coloured according to its distance from the line. Wu's algorithm is comparatively fast, but is still slower than Bresenham's algorithm. A naive approach to anti-aliasing the line would take an extremely long time. In addition, it cannot handle any cases where the line endpoints do not lie exactly on integer points of the pixel grid. Dobb's Journal.īresenham's algorithm draws lines extremely quickly, but it does not perform anti-aliasing. Xiaolin Wu's line algorithm 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. Anti-Aliased Lines (blue) generated with Xiaolin Wu's line algorithm alongside standard lines (red) generated with Bresenham's line algorithm Antialiasing technique
0 Comments
Leave a Reply. |