[Scilab-users] animation of multiple plots

Serge Steer Serge.Steer at inria.fr
Tue Sep 15 18:02:24 CEST 2015


Le 15/09/2015 15:57, grivet a écrit :
> 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)
The subplot instruction above is of no use
>             update trajectory: he2.children(1).data =
> [x(t(1:i)),y(t(1:i))]
>         subplot (1,2,2)
The subplot instruction above is of no use
>             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.
>
Strange. It does not seem to be a Scilab problem, Each gif image is a
bitmap so  there is no reason why several sub windows create a problem....

> 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
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list