2 ms·
Sure, but bresenham's algorithm is a highly optimized form of "drawing a line" in the same way that we can write a highly optimized forward prediction algorithm
by TheRealPomax 5y ago
Sure, but bresenham's algorithm is a highly optimized form of "drawing a line" in the same way that we can write a highly optimized forward prediction algorithm for Bezier curves and it will be more work than Bresenham's algorithm for lines.
The basic "draw a line" is the incredibly simple "single lerp to get the next on-line pixel coordinate" (which for naive drawing, may be the same coordinate, of course).
- akireu 5y ago
- jacquesm 5y agoBresenham's algorithm really is all about integer division, and its applications are far broader than just drawing a line. When I was still doing a lot of CAD work Bresenham's was the proverbial Swiss Army Knife, from stepper control across five axis (including rotation axis for thread cutting) to 3D visualization and all kinds of other odds and ends.