Items tagged with animate

I'm modeling the interaction between rotation and vibration in water molecule. I've come up with the solution functions, but I wanted to make some illustrative animations to fully understand what is going on. I made an animation (in the very end of the attached file) showing vibration of molecule and I want the trajectory of each (of two) particles to be traced after it, how could it be done? Also I want to have the movement of the angular momentum vector (vector with components [Jx=J*cos(varphi)*sin(theta), Jy=J*sin(varphi)*sin(theta), Jz=J*cos(theta)]) be animated simultaneously with the vibration of molecule (on the same plot). Is it hard to achieve?



I want to join two animations, but displayed subsequently, not simultaniously, As far as I got, I have:

plot2 := plots[animate](plot, [tau[1], z = -(1/2)*J .. (1/2)*J, color = red, legend = shear*stress], h = 1 .. 1+1/sqrt(3));
plot3 := plots[animate](plot, [tau[2], z = -(1/2)*h .. (1/2)*h, color = red, legend = shear*stress], h = 0 .. 1);
display([plot2, plot3], insequence = true);

my functions are difined as

tau[1] := h-1+(4/3)*(1/sqrt(3)-h+1)*sqrt(3)*(sqrt(3)*((1/4)*J^2-z^2)/(J^2*b))
tau[2] := (4/3)*sqrt(3)*((1/4)*h^2-z^2)/(h^2*b)

Both plots work individually, however, they have successive ranges. I wondered if I could make 1 plot, with an if statement wether to plot tau[1] or tau[2] depending on where the animation is in the range h. Does anyone know about a solution?

I want to apologize if this being neither necessarily a minimal working example for one question nor just one question is uncomfortable. The "MWE" was created on and is designed for Linux machines including ImageMagick. The problem itself should be obvious to all users though, as the subfolder and creation of the gif are just conveniences. I have three sections concerning the different problems occuring in my attempts.

(which I was told is not doable in maple ... hence the gif)


The goal was to create an animation that zooms in on a function. As maple just wouldn't allow scaling of axis in animations I decided to export single frames and then convert those with ImageMagick. Maple offers ssystem(„...“) which allows for command line usage.

The problem (may as well be a bug) occurs when I try to export images in a for loop with exportplot(...). If the path as well as previously exported images exist, it won't output an error but still not export the desired images. Exporting frames separately works just fine, as well as doing the very same operation in a separate for loop.

(see the first red comment and export section)

After using the workaround in a second for loop. I couldn't figure out how to import the images and then create an animation from them. The main obstacle is the fact that the imported pictures are put into plot-functions.

(see the second red comment)




f1 := s -> sin(2*s):

max_frame := 10: # = number of steps

for k from 0 to max_frame do
    pic[k] := plot(f1(x), x=-Pi*(1-k/max_frame)..Pi*(1-k/max_frame),
                    filled=true, #color = ["Orange"],
                    color = ColorTools:-Color([0,
                    view=[-Pi*(1-k/max_frame)..Pi*(1-k/max_frame), -1..1]
end do:

path := FileTools:-TemporaryDirectory();
path_list := ssystem("pwd");
path := path_list[2];
ssystem("mkdir ./pics"); # creates a subfolder
path := FileTools:-JoinPath([path, "pics"]); # need to change path to subfolder

plotsetup(window, plotoptions="width=480, height=600");
for k from 0 to max_frame do
    file[k] := FileTools:-JoinPath([path,
                                                              convert(k, string),
    # exportplot(file[k], pic[k]); # does not work
end do:

exportplot(file[0], pic[0]); # works

# =====================================================================================
# export
# =====================================================================================
for k from 0 to max_frame do
  exportplot(file[k], pic[k]);
od; # also works

# =====================================================================================
# import
# =====================================================================================
for k from 0 to max_frame do
    reimported_pic[k] := importplot(file[k]); # this might take a while (depending on the amount of frames)
end do: # import works but [Length of output exceeds limit of 1000000]

whattype(reimported_pic[0]); #seems to create a plot function
show := convert(reimported_pic,list):
#Error, while processing result #There is no help page available for this error

show[1]; # works

# =====================================================================================
# create an animated gif at least
# =====================================================================================
delay_time := ceil(evalf(100/max_frame));
command_for_gif := MapleTA:-Builtin:-strcat("convert -delay ",
                                            convert(delay_time, string),
                                            " -loop 0 ", # -reverse ",
                                            FileTools:-JoinPath([path, "frame_*.jpg "]),
                                            FileTools:-JoinPath([path, "animation.gif"])





I would be grateful for any suggestions. Moreover I have run accross


which I could not figure out how to use by the help pages (I tried to create an avi and import that). If someone has informations on that, please share!

  Elena, Liya

  "Researching turkish song: the selection of the main element and its graphic transformations",

   Russia, Kazan, school #57

The setting and visualization of the melodic line of the song
> restart:
> with(plots):with(plottools):
> p0:=plot([[0.5,9],[1,7],[2,9],[4,11],[6,9],[7,11],[8,7],[10,9],[12,9],[14,9],[16,7],[16.5,9],[17,7],[18,9]],color=magenta):p1:=plot([[18,9],[20,11],[22,9],[23,11],[24,9],[26,11],[28,11],[29.5,8],[30,11],[32,9],[33.5,8],[34,9],[36,7],[37.5,5],[38,9],[40,7],[42,5],[44,5],[46,4],[47,5],[48,2],[50,4],[51,5],[51.5,4],[52,2],[54,4],[56,4],[56.5,5],[57,4],[58,5],[60,7],[62,5],[64,7],[66,5]],color=cyan):
> p2:=plot([[66,5],[68,5],[69,5],[70,4],[71,5],[71.5,4],[72,2],[73,4],[74,5],[75,7],[76,5],[78,4],[78.5,7],[80,5],[82.5,4],[83.5,4],[84,2],[86,4],[88,4],[90.5,4],[91.5,4]],color=red):
> p3:=plot([[91.5,4],[92,2],[94,4],[96,4],[96.5,9],[97,7],[98,9],[100,11],[100.5,9],[101,11],[102,9],[104,11],[106,9],[108,9],[109,9],[109.5,9],[110,7],[111,9],[112,7],[113,7],[114,9],[116,11],[116.5,9],[117,11],[118,9],[119.5,11],[120,9],[122.5,9],[124,9],[124.5,9],[125,11],[125.5,9],[126,11],[128,9],[129,7],[130,9],[132,11],[132.5,9],[133,11],[134,9],[136,11],[136.5,9],[138.5,9],[140,9],[140.5,9],[141,11],[141.5,9],[142,11],[143,7],[143.5,7],[144,9],[144.5,9],[145,7],[146,9],[148,11],[148.5,9],[149,11],[150,9],[151.5,11],[152,9],[154.5,9],[156,9],[156.5,9],[157,11],[157.5,9],[158,11],[160,9],[161,7],[162,9],[164,11],[164.5,9],[165,11],[166,9],[168,11],[168.5,9],[171.5,9],[172,9],[172.5,9],[173.5,11],[174,9],[174.5,11],[175,7],[175.5,7],[176,9],[176.5,9],[177,7],[178,9],[180,11],[180.5,9],[181,11],[182,9],[183.5,11],[184,9],[186.5,9],[188,9],[188.5,9],[189,11],[189.5,9],[190,11],[192,9],[192.5,9],[193,7],[194,9],[196,11],[196.5,9],[197,11],[198,9],[200,11],[201.5,9],[202,11],[203,9],[203.5,8],[204,9],[205,7],[205.5,9],[206,11],[207,9],[208,7],[209,8],[209.5,7],[210,9],[211,7],[212,5],[213,5],[213.5,5],[214,9],[215,7],[216,5],[217,5],[217.5,5],[218,7],[219,5],[220,4],[221,4],[221.5,4],[222,7],[223,5],[224,4],[225,4],[227,4],[227.5,4],[228,2],[230,4]],color=blue):
> p4:=plot([[230,4],[232,4],[232.5,5],[233,4],[234,5],[236,7],[236.5,5],[237,5],[238,9],[240,7],[242.5,5],[244,5],[245,5],[246,4],[246.5,5],[247,4],[248,2],[250,4],[250.5,7],[251,5],[252,4],[254,4],[254.5,7],[255,5],[256,4],[258,4]],color=brown):
> p5:=plot([[258,4],[259,4],[260,2]],color=green):
> plots[display](p0,p1,p2,p3,p4,p5,thickness=2);



The selection of the main melodic element in graph of whole song. The whole song is divided into separate elements - results of transformationss0:=plot([[7,11],[8,7],[10,9],[12,9],[14,9],[16,7],[16.5,9]],color=blue):
> s1:=plot([[118,9],[119.5,11],[120,9],[122.5,9],[124,9],[124.5,9],[125,11],[125.5,9]],color=blue):
> s2:=plot([[134,9],[136,11],[136.5,9],[138.5,9],[140,9],[140.5,9],[141,11],[141.5,9]],color=blue):
> s3:=plot([[150,9],[151.5,11],[152,9],[154.5,9],[156,9],[156.5,9],[157,11],[157.5,9]],color=blue):
> s4:=plot([[166,9],[168,11],[168.5,9],[171.5,9],[172,9],[172.5,9],[173.5,11],[174,9]],color=blue):
> s5:=plot([[182,9],[183.5,11],[184,9],[186.5,9],[188,9],[188.5,9],[189,11],[189.5,9]],color=blue):
> s6:=plot([[250,4],[250.5,7],[251,5],[252,4],[254,4],[254.5,7],[255,5],[256,4]],color=blue):
> plots[display](s0,s1,s2,s3,s4,s5,s6);
> s:=plots[display](s0,s1,s2,s3,s4,s5,s6):


Animated display of grafical transformation of the basic element (to click on the picture - on the panel of instruments appears player - to play may step by step).m0:=plot([[7,11],[8,7],[10,9],[12,9],[14,9],[16,7],[16.5,9]],color=blue):
> pm:=plot([[118,9],[119.5,11],[120,9],[122.5,9],[124,9],[124.5,9],[125,11],[125.5,9]],color=red,style=line,thickness=4):
> iop:=plots[display](m0,pm,insequence=true):
> plots[display](iop,s0);

> m0_t:=translate(m0,110,0):
> m0_r:=reflect(m0_t,[[0,9],[24,9]]):
> plots[display](m0,m0_r,insequence=true);
> m0r:=plots[display](m0,m0_r,insequence=true):

> pm0:=plots[display](pm,m0):
> plots[display](pm0,m0r);

> m0:=plot([[7,11],[8,7],[10,9],[12,9],[14,9],[16,7],[16.5,9]],color=blue):
> pn:=plot([[134,9],[136,11],[136.5,9],[138.5,9],[140,9],[140.5,9],[141,11],[141.5,9]],color=blue,thickness=3):
> iop:=plots[display](m0,pn,insequence=true):
> plots[display](iop,s0);

> m0_t1:=translate(m0,126,0):
> m0_r1:=reflect(m0_t1,[[0,9],[24,9]]):
> plots[display](m0,m0_r1,insequence=true);
> m0r1:=plots[display](m0,m0_r1,insequence=true):

> pm01:=plots[display](pn,m0):
> plots[display](pm01,m0r1);


> pm2:=plots[display](pn,pm,m0):
> plots[display](pm0,m0r,pm01,m0r1);

> pt_i_1:=seq(translate(pm,5*11*i,0),i=0..4):
> plots[display](pt_i_1);

> pm_i:=seq(translate(pm,5*11*i,0),i=0..4):
> plots[display](pm_i);
> iop1:=plots[display](pm_i,insequence=true):
> plots[display](iop1,s0);


> pm_i_0:=seq(translate(m0_r,5*11*i,0),i=0..4):
> plots[display](pm_i_0);
> iop2:=plots[display](pm_i_0,insequence=true):
> plots[display](iop2,s0);








I would like to animate solid of revolution for a region bounded by y=x^2+1, y=x, x=0 and x=2;

(a) about x=-1

(b) about y=6

Could anyone please help?



Hello everyone,

I'm working on a simulation for standing wave to prove that the combination of 2 waves in opposite direction can create standing wave. So I use these:

> restart;
> with(plots):
> W1:=A*cos(omega*t-k*x);

> W2:=A*cos(omega*t+k*x);

> W:=W1+W2;

> SW:=(A,omega,k)->animate(plot,[{W1,W2,W},x=-4..4,y=-4..4,color=[red,green,blue],scaling=constrained],t=0..5,frames=10);

> display(SW(2,2*Pi,5),insequence);

It did work if SW is a function with one variable, now I need 3 variables (A,omega,k);

It said: "Plotting error, empty plot"

Please show me my mistake or an another method. Thank you

Hello everyone, I'm a new one to Maple, I've just learnt some basic tools.

I want to creat a command that can animate the graph of line y=ax+b by the parameter a, and b will be subscribe later. For example, I can plot y=x+b by:



It did work.

However, applying this with animation didn't seem to work. 



It did not create an animation, instead 5 frames of this graph for a=0, 2.5, 5, 7.5, 10

Please show me a solution for this problem, thank you


I am trying to manually enter some data into some TimeSeries format and then use that in an Animated BubblePlot but there are few examples.  Can someone create an example to show some random data entered in as a time series so that BubblePlot can animate it?  I am having many problems with this.

have eroror when run command below


animate(dualaxisplot(plot(sin(x+A), x=0..5), plot(cos(x+A), x=0..5), style = line, gridlines = false), A = 0 .. 5);

I am modeling a molecule.  I have six line segments.  I know the coordinates of their ends as functions of time.  Naively, I would think it would go like this:

define some functions (composites of trig functions, rational functions, etc)

define points 1,2, ..., 6.   (in terms of the functions)

define line1, line2, ...., line6

define structure = union of 6 lines

animate(structure) as t goes from t_0, ..., t_1

How exactly do i do this?

I would like to overwrite a plot that's updated within a loop over time. 

I used animate already, but the problem is that it's  only updated at specific points in time (not regularly distributed) and with animate I can only use frames that are equally divided over the wholre range. To update each time step costs unneeded memory and time. 

I hope that there exists a better solution.

thanks for your help.

Hi all,


I'm trying to create the 3D animation which can show the idea of rotating 2D function plot, such as:



display(seq(surfdata([seq([seq([x, cos(2*p*Pi*(1/25))*x^(1/2), -sin(2*p*Pi*(1/25))*x^(1/2)], x = 0 .. 4, .1)], p = 0 .. t)]), t = 1 .. 25), insequence = true);

But it's too inconvenient because of too many seq functions in this commond, is there any easier way to plot this animatiton?

Thank you.

Hi, is it possible to instantly start the display of plot animations after they are generated in maple? I searched for answers in the documentation and on the internet but couldn't find a solution. I would like to skip the step of manually clicking the plot and the "play animation" button.

Hi all, I am new to MAPLE, I have been using Mathematica mostly. Here is what i am trying to do in MAPLE, 

Use the procedure plotmotion 2 on the plotmo worksheet to animate the motion of a marble in a bowl of the shape of the bottom half of the ellipsoid x^2/16 + y^2/12 +z^2/9 = 1

Can anyone help? It will be greatly appreciated.

is it possible to use an animated zoom on a pointplot?

I used the view option (view = [-t .. t, -t .. t]) and animated the t value in a sequence, but it did not work.

kind regards,

Harry Garst


1 2 3 4 5 6 7 Page 1 of 7