% asteroiden
clf
shg
t=linspace(0,2*pi); r0=0.25; r1=1-r0;
x=cos(t).^3; y=sin(t).^3;
for i=1:length(t)
    plot(cos(t),sin(t),'b'), hold on
    plot(r1*cos(t(i))+r0*cos(3*t),r1*sin(t(i))-r0*sin(3*t),'g')
    plot(x(1:i),y(1:i),'r',x(i),y(i),'mo')
    plot(r1*cos(t(i))+r0*cos(3*t(i)),r1*sin(t(i))-r0*sin(3*t(i)),'ok'), hold off
    axis equal, axis([-1.1 1.1 -1.1 1.1]), title('Asteroid')
    pause(0.1)
end
