Question: How to produce animation in Threads?

In the worksheet below I produce a sequence of frames for an animation by distributing the task into several threads.  The result has strange artifacts as we see in the sample.  The artifacts vary randomly from run to run.  Am I doing something wrong?

restart;

kernelopts(version);

`Maple 2018.2, X86 64 LINUX, Oct 23 2018, Build ID 1356656`

kernelopts(numcpus);

4

Draw a simple picture:

frame := proc(t)
  plot(x^2 + t, x=-1..1, title=typeset("t = %1", t));
end proc:

Generate a sequence of pictures:

frames := Threads:-Seq(frame(t), t=0..1, 0.05):

Animate the sequence:

plots:-display([frames], insequence);

Download theads.mw

Please Wait...