function plotb(a)
% plotb(a)
[m n] = size(a);
hold on
for i1 = 1:m
  x1 = a(i1,2); y1 = a(i1,1); x2 = a(i1,4); y2 = a(i1,3);
  xmin = min(x1,x2); xmax = max(x1,x2);
  ymin = min(y1,y2); ymax = max(y1,y2);
  xdif = xmax-xmin; ydif = ymax-ymin; maxdif = max(xdif,ydif);
  p1 = [x1, y1]; p2 = [x2, y2];
  if maxdif == 0
    plot(x1,y1,'oy');
  else
    t = 0:(1/maxdif):1;
    for index = 1:length(t)
      x = (1-t(index))*p1(1) + t(index)*p2(1);
      y = (1-t(index))*p1(2) + t(index)*p2(2);
      plot(x,y,'-r');
    end
  end
end
hold off
