[a,e]=view

aviobj = avifile('eyemovie.avi','fps',5); 

step = 2

for k=1:step:20
	e = e + 2;
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

for k=1:step:10
	a = a + 1;
	e = e + 1;
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

for k=1:step:80
	a = a + 1;
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

for k=1:step:10
	a = a + 1;
	e = e + 1;
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

for k=1:step:80
	a = a + 1;
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

for k=1:step:10
	a = a + 1;
	e = e + 1;
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

for k=1:step:80
	a = a + 1;
	e = e - ( (80-k) / 400 );
	view(a,e)
	frame = getframe(gcf);
	aviobj = addframe(aviobj,frame);
end

aviobj = close(aviobj);
