Question: Showing which plots were obtained earlier and which - later

I want to show which parts of a sequence of plots were obtained later.

The program, written with a huge help from Mapleprimes forums (thanks!) draws some (for example, 200 but it varies) small plots and then paints all of them on one picture. It would be more clear if one could see what happened first. I am thinking of different colours for consequtive plots but not sure that know how to use them well.

If it may be important, the program is below. I would appreciate any help.

 

printlevel := 4;

iter := 200;

for a from 2.5 by .5 to 2.5 do

for m from -.999 by .999 to -.999 do

for n from -5 by 5 to -5 do

ODE := diff(diff(x(t), t), t)+.2*(diff(x(t), t))-x(t) = a*sin(t);

k[1] := 0;

ics[1] := x(k[1]) = m, (D(x))(k[1]) = n;

for i to iter do

X[i] := dsolve({ODE, ics[i]});

u[i] := rhs(X[i]);

v[i] := diff(rhs(X[i]), t);

S1[i] := RootFinding:-NextZero(unapply(rhs(X[i])-1, t), k[i]+0.1e-3);

S2[i] := RootFinding:-NextZero(unapply(rhs(X[i])+1, t), k[i]+0.1e-3);

k[i+1] := min(select(type, [S1[i], S2[i]], numeric));

p[i] := evalf(subs(t = k[i+1], u[i]));

q[i] := evalf(subs(t = k[i+1], v[i]));

ics[i+1] := x(k[i+1]) = p[i], (D(x))(k[i+1]) = -q[i];

plot([u[i](t), v[i](t), t = k[i] .. k[i+1]]);

plo[i] := plot([u[i](t), v[i](t), t = k[i] .. k[i+1]])

end do;

print(NOW*WELCOME*TO*THE*PLOT!);

plots:-display(seq([plo[i]], i = 1 .. iter))

end do

end do

end do

Please Wait...