function s= wrtlin(a,b,r,c)
% wrtlin writes lines of which the lineparameters are given in the arrays
% a and b in an image s.
% s: result image
% a,b : array with line parameter row=a*column + b
% r,c : desired size of s 
%
s(r,c)=0;
[k,l]=size(a);
	for j1=1:c
		for pos=1:l
			a1=a(pos); b1=b(pos);
			y= a1*j1+b1;
			for io=max(3,y-2):min(y+2,r);
			s(io,j1)=1;
			end;	
		end;
	end;
end

