Say you have a line segment somewhere on the Cartesian plane that connects the points $(x_1,y_1)$ and $(x_2,y_2)$, and there are "pixels". For simplicity's sake, let's say that the pixels are 1 unit by 1 unit.
How could I go about finding all the pixels that the line touches? (This is part of a computer program, so I would prefer something fast)
Thanks!
