load coord.out;
n = coord(1,1);
bounds = coord(1,2:end);
[x,y,z] = sphere(15);
thclrs{1} = 'red';
thclrs{2} ='blue';
thclrs{3} ='green';
thclrs{4} ='cyan';
thclrs{5} ='magenta';

for i=1:n,
    rs{i} = 1;
    xs{i} = x;
    ys{i} = y;
    zs{i} = z;
    clrs{i} = thclrs{1+mod(i,length(thclrs))};
end
clrs{1} = 'yellow';

[nl,stam] = size(coord) ;
l=2;
t=0;
j=1;

scrsz = get(0,'ScreenSize');
f = figure('Position',[1 0 scrsz(3)*.96 scrsz(4)*.96]);

%shg;
while (l<nl)
    if coord(l,1)==t
        if rs{j} ~= coord(l,4)
            rs{j} = coord(l,4);
            xs{j} = x*rs{j};
            ys{j} = y*rs{j};
            zs{j} = z*rs{j};
        end
        h{j} = surf(xs{j}+coord(l,5), ys{j}+coord(l,6), zs{j}+coord(l,7),'FaceColor',clrs{j});
        hold on;
        l = l+1;
        j = j+1;
    else
        axis(bounds);
        drawnow;
        
        hold off;
        j=1;
        t = t+1;
    end
end
 
close;
            
        
