[Scilab-users] animation of multiple plots

grivet grivet at cnrs-orleans.fr
Tue Sep 15 15:57:41 CEST 2015


Hi,

I am trying to animate multiple plots. For instance, when modeling the 
motion of a planet
around the sun, I wish to plot, in one window, the planet's position 
and, in another window, the tip of the velocity vector, both plots 
evolving with time.
I can do that in principle with the following algorithm.
     for each time point
         compute x,y,vx,vy
         define he2 handle of the trajectory
         define he6 handle of the velocity curve
         drawlater()
         subplot(1,2,1)
             update trajectory: he2.children(1).data = [x(t(1:i)),y(t(1:i))]
         subplot (1,2,2)
             update velocity: he6.children(1).data = [vx(t(1:i)),vy(t(1:i))]
         drawnow()
         record gif image
         update x,y,vx,vy
     end
Using imageMagick, I then combine all the gif's in an single animation 
file.

This process works on my computer. I can visualize the animation using 
Irfanview,
Chrome or Internet Explorer, but not Firefox which shows only the last 
image.
The situation gets worse when I try to post this animation on the Net: 
no program
that I know of can display the animation, they all display the first image.

I have written other animations which behave properly (see 
https://grenoble-sciences.ujf-grenoble.fr/pap-ebook/grivet/liste-animations). 
However, there is one,
probably significant, difference: these working animations don't use 
multiple windows.

I would be very grateful for any suggestion on how to run two animations 
side by side.
Thank you in advance for your time and help.
JP Grivet





More information about the users mailing list