function I=draw_line(x1,y1,x2,y2, I) for s=0:0.01:1 x=x1*(1-s)+x2*s; y=y1*(1-s)+y2*s; I(round(y), round(x)) = 255; end;