Bresenham's Line Algorithm - Demystified Step by Step
Bresenham's Line Algorithm is simple, but how exactly does it work? In this video we go through the steps necessary to draw a line inside a grid of pixels using only integers. To do this, we're going to write the algorithm from scratch and derive the decision parameter used in Bresenham's algorithm.
Analytics
Comments
That was one of the best explainers of a (graphics programming) algorithm I have ever seen! And it was super entertaining, too! Moreover, I'm really surprised how good the visualizations look, despite everything -- including the grid lines -- having a black outline. Would have expected that it would make everything look cluttered. The only thing I didn't like so much were the typing sounds when code is typed.
9The pace, explanations, animations, sound --- they were all great! I think the one thing that threw me off was the context. I had never heard of Bresenham's algorithm and didn't know what it was, so when starting to see the video I was lost by it. I think spending a few seconds saying what the problem is would go a long way (instead of motivating it with the terms that are hard to understand in the algorithm, which fall out of nowhere).
6.9Very interesting coding algorithm. I’d just be interested in explaining when this algorithm is useful as well (for example: in the programming of MS Paint, etc.)
7Nice analysis. I didn't know what this algorithm was, so it would have been nice to have a brief explanation at the beginning.
5The explanation is pretty clear, and I can follow all the steps. But you jump right in without explaining what the problem you're trying to solve is. It would help a lot to add a couple sentences of intro at the start.
6.2Great video. A bit confused by your "m > 0" "m < 0" octant descriptions - are they correct? May need some explanations.
7.3A clearly well-meaning attempt but misses some crucial motivation and introduction on why this problem is of interest to the viewer (what the bigger picture is, why it is important etc).
3Great video! Really well done on many levels. If I were to point to one thing that you could improve, I think that the introduction would benefit from a little topic clarification. The current opening line of, "If you look up Bresenham's line algorithm..." may leave a small gap in understanding, depending on who is watching. It may not be immediately clear that this algorithm's purpose is drawing lines. This confusion would not last long, granted, but I think it would be worth a minor remedy like changing the opening line if only slightly, "If you look up Bresenham's algorithm for drawing a line..." but you could also back out a little and motivate the algorithm by saying something like, "There are many ways to draw a line programmatically, but what if we didn't want to use the slope or division?" Again, really great work. I'll definitely be subscribing and sharing your videos!
8.8Very clear explanation, interesting approach to the topic, and true to the channel's name.
7.6If dx=0 or dy=0 you skip drawing a line altogether until the very last stage. If dx=0 AND dy=0 (start point = end point) you don't draw anything at all, but don't line-drawing algorithms as implemented at least output one pixel in that case? I guess you're counting that as a 'cleanup' issue but I feel you should have mentioned it. Other than that, a nice clear explanation of a fundamental piece of computer graphics that goes all the way back to the 8-bit era. Are you going to look at anti-aliased lines for next year?
5.8p0 would have been more consistent/intuitive than pInitial
6.7The details of the algorithm and the derivation are quite clear and the presentation style is intuitive. I would like to also see some cases on why the algorithm would be useful in an applied setting in terms of what motivates us to use an integer based algorithm compared to a floating one.
5A decent programming algorithms video but that is different than mathematics exposition.
3.2I would just say that it feels a lot like a coding exercise more than a math explanation. The math there is the linear equation properties. Bresenham's Line Algorithm is a coding thing right? I don't know much about this stuff. But it was nice with all the editing and stuff.
3.8Nicely structured explanation and very clear.
7Great visualization. It is different because it is code. The explanation was really easy to follow. The objective of the video is clear, and it was reached by the end of the video. Thanks for the video and I hope you keep doind this kind of videos.
7.7This was a really great video. Everything is clearly explained, and the graphics support the explanation really well. My only real complaint is that there is little in the way of motivation. Perhaps that is just my shortcoming, but things felt rushed in the very beginning because I didn't know why we were going down this path. Of course, once I stopped worrying about that the video was very solid.
7.3Very nice! Very clearly explained and at a good pace. I didn't feel lost in there at all. Graphics were also clean and animations smooth and pleasing to the eye. Only area of improvement I might mention is to introduce and motivate Bresenham's Line Algorithm at the beginning of the video. It's mentioned but you don't really say what it is and what is special about it until later in the video. Overall, excellent work! I enjoyed this video.
6.9