% WV_interf.m
%
% P. Flandrin
clf
pause

N = 32;
M = moviein(N);

Ns = 256;
Na = Ns/12;
sigc = atoms(Ns,[Ns/2,.25,Na,1]);

for k = 1:N
	figure(1)
	clf
	sig = sigc + atoms(Ns,[fix(Ns/2+(3*Ns/8-(k-1)*3*Ns/4/N)*cos(2*pi*k/N)),.25+0.1875*sin(2*pi*k/N),Na,1]);
	figure(1)
	clf
	wv = tfrwv(sig,1:Ns,Ns);
	imagesc(flipud(wv+abs(wv)));
    colormap(jet)
    set(gca,'YTick',[]);set(gca,'XTick',[])
    M(:,k) = getframe;
end

movie(M,-5)
