gcf; hold on
for i = 1:nbeams
    t = b_list(i);
    xx = nodes(edges(i,1:2),1);
    yy = nodes(edges(i,1:2),2);
    plot(xx,yy,'LineWidth',1,'Color','k')
    xx = 2*Xmax-nodes(edges(i,1:2),1);
    yy = nodes(edges(i,1:2),2);
    plot(xx,yy,'LineWidth',1,'Color','k')
    xx = 2*Xmax-nodes(edges(i,1:2),1);
    yy = 2*Ymax-nodes(edges(i,1:2),2);
    plot(xx,yy,'LineWidth',1,'Color','k')
    xx = nodes(edges(i,1:2),1);
    yy = 2*Ymax-nodes(edges(i,1:2),2);
    plot(xx,yy,'LineWidth',1,'Color','k')
end
axis equal; axis tight;
set(gca,'Color',[211/255 211/255 211/255]);
set(gca,'XTick',[],'YTick',[]);
box on
fleg = legend('figure()');
set(fleg,'visible','off')
%legend off
