Question: An animation problem

I wanted to make an animation of the 3-leaved rose, but the following codes only produce the separate figures.

with(plots):
r:=sin(3*t):

K:=30: for i from 1 to K do ti:=i*2*Pi/K:

curve[i]:=polarplot(r(t), t=0..ti) od:

C:=display(seq(curve[i],i=1..K), insequence=true):

display(C, scaling=constrained,tickmarks=[0,0], thickness=3);

 

 The following codes produces the animation I needed.
with(plots):
r:=sin(3*t):

K:=30: for i from 1 to K do ti:=i*2*Pi/K:

curve[i]:=polarplot(r(t), t=0..ti) od:

C:=display(seq(curve[i],i=1..K), insequence=true):

display(C, C, scaling=constrained,tickmarks=[0,0], thickness=3);

 

The only difference is in the last line, where the “C” has been written twice instead of once. I don’t know why. Could anyone explain it to me? Thanks.

 

 

 

Please Wait...