
function demo_fibonacci

N=4;

z=[1 fibonacci(N)];
n=fibonacci(N+1);
i=0:n-1;
k=i'/n;

t0=[k*z(1) k*z(2)];
tx=t0(:,1)-floor(t0(:,1));
ty=t0(:,2)-floor(t0(:,2));
t=[tx ty];

fprintf('\n \t pts: %6.0f \n',size(t,1));
tx0=unique(tx);
ty0=unique(ty);
fprintf('\n \t tx0: %6.0f \n',length(tx0));
fprintf('\n \t ty0: %6.0f \n',length(ty0));

value=star_discrepancy(z);
fprintf('\n \t star disc: %1.5e \n',value);


plot([0 1 1 0 0],[0 0 1 1 0],'k-','LineWidth',4);
axis equal;
hold on;
plot(t(:,1),t(:,2),'ko','MarkerEdgeColor','k',...
                       'MarkerFaceColor','g',...
                       'MarkerSize',10);
hold off;





