Talk:Xiaolin Wu's line algorithm
The extension to cover nearly-vertical lines is trivial, and left as an exercise for the reader.
Doesn't get any more aloof than that, gentlemen.
Indeed it doesn't, and could frustrate someone coming to Wikipedia for algorithm help (I know I have). If they haven't studied Bresenham's algorithm the way to fix it may not be so obvious. I'll edit the article.
This Article needs some Images.
Maybe even readers not able to use a compiler themselves may want to know what it looks like...
Typo in code?
// check that x1 < x2
if x2 < x1
swap x1, x2
Surely just swapping x1 and x2 creates a mirror-image of the line? Shouldn't y1 and y2 also be swapped?
This is what is done in Bresenham's_line_algorithm:
if x0 > x1 then
swap(x0, x1)
swap(y0, y1)
The nearly-horizontal case
"the nearly-horizontal case (Δx > Δy)"
makes more sense (to me) if it would read
"the nearly-horizontal case (Δx ≫ Δy)"
Am I missing something obvious here?