Re:How to draw ugly lines fast
by hoseja on Tuesday December 20, 2022 @06:30AM
(#34064469)
What's wrong with drawing (possibly resulting in thicker line) pixels everywhere the mathematical line intersects the pixel?
[ Parent
| on HN ]
Performance. The point of line drawing algorithms like Bresenham is to not need to do anything like costly floating-point intersection tests for every pixel. Also aesthetics: a single-pixel width line with occasional doubled pixels just looks uglier than one without them. That said, the algorithm for finding every cell in a grid lattice that intersects a line is occasionally useful for purposes other than line drawing.