%  ____ Creating :  2D - BinBaum  = Pascal'sches Dreieck
%  _________________________________________

clear all; clf; close all;

x0 = 10;
y0 = 2;      %  Startpunkt
dx = 1;      %  Spannweite  einstellen : 0.5 oder 1.5 ....
dy = 1;      %  oder hier Spannweite einstellen
N = 5;        %  Anzahl Time Steps
 
hold on
for i=0:N
    for j=0:i
       plot(x0+i*dx, y0+(j-i/2)*dy, 'ob');
       if (i>0)
           if (j<i)
               plot([x0+i*dx x0+(i-1)*dx], ...
                       [y0+(j-i/2)*dy y0+(j-(i-1)/2)*dy],'r-');
           end
           if (j>0)
               plot([x0+i*dx x0+(i-1)*dx], ...
                       [y0+(j-i/2)*dy y0+((j-1)-(i-1)/2)*dy],'g-' , ...
                        'markerSize', 8, 'LineWidth' , 2);
           end
       end
    end;
end;
axis equal;