set(0, 'defaultfigurevisible', 'off');
[x,y]=meshgrid([0:0.01:1],[0:0.01:2]);
 
for t=[0:500]
 subplot(2,2,1)    
 
	n1=1;
	n2=1;
        z=3*sin(n1*pi.*x).*sin(n2*pi/2.*y)*cos(sqrt(n1^2+n2^2/2)*pi^2*t/100);
        mesh(x,y,z);
        axis([0 1 0 2 -4 4]);
        view(60,30)
        shading interp;
        axis off
 subplot(2,2,2)

        n3=1;
        n4=2;
        z=3*sin(n3*pi.*x).*sin(n4*pi/2.*y)*cos(sqrt(n3^2+n4^2/2)*pi^2*t/100);
        mesh(x,y,z);
        axis([0 1 0 2 -4 4]);
        view(60,30)
        shading interp;
        axis off
 subplot(2,2,3)
       
        n5=2;
        n6=2;
        z=3*sin(n5*pi.*x).*sin(n6*pi/2.*y)*cos(sqrt(n5^2+n6^2/2)*pi^2*t/100);
        mesh(x,y,z);
        axis([0 1 0 2 -4 4]);
        view(60,30)
        shading interp;
        axis off
 subplot(2,2,4)
        
	n7=1;
        n8=3;
        z=3*sin(n7*pi.*x).*sin(n8*pi/2.*y)*cos(sqrt(n7^2+n8^2/2)*pi^2*t/100);
        mesh(x,y,z);
        axis([0 1 0 2 -4 4]);
        view(60,30)
        shading interp;
        axis off

	
    filename=sprintf('output/%05d.png',t);
    print(filename);
end
