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:
I am just curious: when we see the lines depicted by different pixels combination from a certain distance, do they all look the same?
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.
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)
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](https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/LineXiaolinWu.gif/672px-LineXiaolinWu.gif)