Previous | Next --- Slide 48 of 78
Back to Lecture Thumbnails
chenj

I am just curious: when we see the lines depicted by different pixels combination from a certain distance, do they all look the same?

motoole2

This is a bit of a loaded question, because it depends on a lot of factors. Clearly the lines are not the same if they are using different pixel combinations. But to the human visual system, two lines may look the same at a certain distance or pixel resolution.

rsnair

Since this line can be created using different sets of pixels to light up...there doesn't seem to be a concrete right/wrong answer as it seems to depend on the algorithm. However could you argue that perhaps the answer which requires the least amount of pixels to change is the better one? (Assuming they all produce the same 'correct' perceived line)

motoole2

Exactly! There are many ways to draw a line with a discrete set of pixels, and there's no "correct" answer to how this should be done. Bresenham's line algorithm is computationally efficient and is the "correct" solution from the perspective of rasterizing a line quickly, but other line algorithms might be more favorable when it comes to the quality of the line, such as this animation of Xiaolin Wu's line algorithm in action: Line rendered with Xiaolin Wu's algorithm