% John Kerl
% kerl.john.r@gmail.com
% 2008-03-07

thetalo = 0.0;
thetahi = 2*pi;
ntheta  = 1000;
dtheta  = (thetahi-thetalo)/ntheta;

tlo = 0.0;
thi = 1.0;
nt  = 10;
dt  = (thi-tlo)/nt;

clips = moviein(nt);

i = 1
for t = tlo : dt : thi
	theta = thetalo:dtheta:thetahi;
	x = cos(1*theta) *t;
	y = sin(3*theta) *(1-t);
	plot(x, y);
	clips(i) = getframe(gcf);
	i = i + 1;
end

movie2avi(clips, 'mymovie.avi', 'compression', 'none');
