function M=film(iter,beta,N,w0);

w=w0;
imagesc(w),axis('square'),colormap(gray),drawnow
M=moviein(iter+1);
M(:,1)=getframe;
for i=1:iter
  w=simbin(beta,N,1,w);
  imagesc(w),axis('square'),colormap(gray),drawnow
  M(:,i+1)=getframe;
end
