3 ms·
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. Al
by Sharlin 4y ago
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.