u = 0:2*pi/64:2*pi;
v = -2:4/64:2;
[U,V] = meshgrid(u,v);

for i=1:10
    surf(cos(U)/i,sin(U),V);
    xlim = [-1 1];
    ylim = [-1 1];
    zlim = [-1 1];
    title(['i = ', num2str(i)]);
    filename = ['movies/', 'movie', num2str(i)];
    print('-djpeg100',filename);
    pause(0.5);
end

for i=11:20
    surf(cos(U),sin(U)/i,V);
    xlim = [-1 1];
    ylim = [-1 1];
    zlim = [-1 1];
    title(['i = ', num2str(i)]);
    filename = ['movies/', 'movie', num2str(i)];
    print('-djpeg100',filename);
    pause(0.5);
end

for i=21:30
    surf(cos(U),sin(U),V/i);
    xlim = [-1 1];
    ylim = [-1 1];
    zlim = [-1 1];
    title(['i = ', num2str(i)]);
    filename = ['movies/', 'movie', num2str(i)];
    print('-djpeg100',filename);
    pause(0.5);
end