t=linspace(0,2*pi,400)
theta=0:pi/100:2*pi;
x=2.*cos(theta);
y=2.*sin(theta);
z=2.*theta;
plot3(x,y,z);
[x1,y1]=meshgrid(t);
zh=0*ones(size(x1));
theAxes=axis;
m=moviein(400);
for i=1:400
plot3(x1,y1,zh);
hold on
plot3(x(i),y(i),z(i),'.');
hold off
grid on
axis(theAxes);
m(:,i)=getframe;
end
movie(m,20);
|