News for hackers. Stuff that matters.
Re:Dithering – Part 1 by dreamcompiler on Thursday October 30, 2025 @12:14PM (#45761675)
The cool thing about Bresenham is that you're constantly picking the pixel closest to the desired slope but you never have to do the explicit division of deltaY/deltaX. The division happens implicitly as you draw the line, using only addition and subtraction of integers. Which was quite handy for the primitive computers circa 1960 when Jack Bresenham invented it.
Re:Dithering – Part 1 by kragen on Friday October 31, 2025 @01:11AM (#45768636)
You mean the desired position. If you were always picking the pixel closest to the desired slope, your lines would all be at multiples of 45°.

I agree that the lack of division is surprising and beneficial.

Re:Dithering – Part 1 by kragen on Thursday November 13, 2025 @07:39PM (#45922546)
Another dithering discussion two weeks later: https://news.ycombinator.com/item?id=45814939