Hello Adam, Knowing this and having quickly read up on Wu's algorithm, I can be sure the Wikipedia description is either wrong or the algorithm is. You need to interpolate the values for three pixels for a one-pixel wide line for it to be accurate, with increasing error as the slope goes to 45 degrees. You determine the cosine of the slope of the line (as in bresenham) compared to the horizontal or vertical line nearest to where you're going. You multiply it with the distance in pixels of the pixel you're drawing compared to the centerpoint you're drawing toward and determine whether the outcome is within ((line width - 1) / 2). If so, it's black. If it's larger but below ((line width + 1) / 2), interpolate the value linearly between these values. If it's larger than that, it's white. For getting a "round" starting point you have to extrapolate the "line width" to match the distance. You would also have to compensate for that in the starting point line width as the outer most points will deviate from the "rounded" distance. Regards, good luck and keep us posted, Peter On 17/10/2007, M. Adam Davis wrote: > Excellent suggestion! I'll have to try this out. I wonder if I can > extend this to the Wu antialiasing line algorithm... Seems like it > would essentially be the same. > > -Adam > > On 10/17/07, Peter Bindels wrote: > > On 17/10/2007, M. Adam Davis wrote: > > > Unless there's some secret cluster that guarantees each pixel gets > > > written exactly once... > > > > Horizontal or vertical line stretched so that the resulting line is as > > wide as you want it to be, at an angle of 45-135 degrees to the > > direction you want to go. Everytime you skip ahead one line in > > bresenham, it moves at most one pixel. Your line will be as wide as > > this line is and all pixels will be drawn at most once. Make sure to > > scale the width according to the angle of the line (if you go at a 45 > > degree angle, make it 1.4 times the desired width etc.). > > > > Regards, > > Peter > > -- > > http://www.piclist.com PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > -- > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - > Moving in southeast Michigan? Buy my house: http://ubasics.com/house/ > > Interested in electronics? Check out the projects at http://ubasics.com > > Building your own house? Check out http://ubasics.com/home/ > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist