Efficient way to get integral points of segment from two points in grid
For a line segment defined by two integral lattice points $(x_0,y_0), (x_1,y_1)$ there will be $gcd(y_1-y_0,x_1-x_0)-1$ additional integral points along the line segment.
To find them move along line by largest value in the reduced slope.