function segment(x0, y0, dx, dy, L)
%segment draws a segment of length 2L going through (x0, y0) with slope dy/dx
% (when dx is not 0). That is, the line has direction vector (dx, dy).

%Norm of the direction vector
norm = sqrt(dy.^2 + dx.^2);
%coordinates of one endpoint
%x1 = x0 - 
%y1 = y0 - 
%coordinates of another endpoint endpoint
%x2 = x0 + 
%y2 = y0 + 
%plot the segment
plot([x1 x2],[y1 y2]);


end

