Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am making an instructional program in which a random number appears and moves across and down into the appropriate bin, landing on top of the existing stack. Then another number appears, repeating the animation sequence until it lands on top of its own stack. When any stack reaches the top, the animation stops and this example of the distribution can be observed.

Thus,I wish to combine a sequence of animations, using the output of one to serve as the background to the next. How can I save the final graph of each Animate sequence so as to use it for the input of the next? The fact that animations are examples of Manipulate complicates matters. Do loops, etc. do not work here.

share|improve this question

I'm not sure if this is actually what you want, but I think this might be an approach:

Manipulate[temp = {Green, Disk[{5, 0}, {3, 1}]};
plot = Plot[Sin[x + a], {x, 0, 10}, Prolog -> temp], {a, 0, 5}, 
AnimationRunning -> True], 
temp = {Texture[Rasterize[plot]], 
Polygon[{Scaled[{0, 0}], Scaled[{1, 0}], Scaled[{1, 1}], 
Scaled[{0, 1}]}, 
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}]]

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.