Items tagged with animate animate Tagged Items Feed

i am modeling a simple standing wave. i have created three plots y1, y2 and y and then i am using animate to move them. the problem is that i cant add a legend describing every plot and i am not getting how to do this.

in addition when i click on the plot and then go to the legend menu, both show legend and edit legend are disabled.

here is my code
 
with(plots): y1:=0.01*sin(Pi/2*x-40*Pi*t);

y1 := -0.01 sin(-1/2 Pi x + 40 Pi t)

Hi everyone,

 

I have this differential equations:

gamma1:=1;gamma2:=1;

l:=t->sqrt((x1(t)-x2(t))**2+(y1(t)-y2(t))**2);
2 2
l := t -> sqrt((x1(t) - x2(t)) + (y1(t) - y2(t)) )

DE:=[diff(x1(t),t)=(-1/(2*Pi))*gamma2*(y1(t)-y2(t))/l(t),diff(y1(t),t)=(-1/(2*Pi))*gamma1*(x1(t)-x2(t))/l(t),diff(x2(t),t)=(-1/(2*Pi))*gamma2*(y2(t)-y1(t))/l(t),diff(y2(t),t)=(-1/(2*Pi))*gamma1*(x2(t)-x1(t))/l(t)]:

I want to draw the phase portraits (x1(t...

HI everyone, im currently using maple 15 and im trying to animate at least the mass of my pendulum. My problem is that the  coordinate of each mass would be the solution of two numerical ODE and I can't animate this. I am able to plot the solution of my ODE (wich correpond to the two angle in the pendulum), but when it comes to animating... its an another piece of work. So here is what I tried: the code would correspond to the animation two masses... no rope yet.

Hi,

Im trying to animate a simple pendulum with maple 15. I'm able to make to the pendulum masse move, but, somehow, I can't animate the rope of the pendulum. I tried to draw the rope with the plottools library line , but no success.

Pendulum:=proc(x,y)plots[pointplot]([x,y],color=blue, symbol=solidcircle,symbolsize=25) end proc:
A:=animate(Pendulum,[XCoordinate,YCoordinate],t=0..8,frame=100):
Rope:=plottools[line]([0,1],[XCoordinate,YCoordinate],color=blue,thickness=3):

Firstly applogies for if this question has been asked before.

I am trying to plot a simple epidemic model for where I can change the rates.

My equations are:

de1:= diff(X(t),t)=a*X(t).Y(t);

de2:=diff(Y(t),t)=a*X(t).Y(t) - b*Y(t);

where X is susceptibles and Y is infected.

I would like to be able to produce a graph with the susceptible and infected plotted. Where i can change the initial conditions of X(0) and Y(0) using sliders...

I am displaying in 2D, multiple arrows with amplitudes oscillating sinusoidally.  I wish each arrow to have its own color. I have included the commands I am using. Please provide the command that will provide the colors. Thanks.

Ax:=t->cos(5*t);Ay:=t->0;Bx:=t->-cos(5*t)/2;By:=3*cos(5*t)/2;

animate(arrow,[[[0.0],[0.0]],[[Ax(t),Ay(t)],[Bx(t),By(t)]]],t=0..Pi,view=[-2..2,-2..2],color=[blue,green])

Another animation of heart shape

February 13 2012 by Kitonum 345 Maple

This post is continuing the theme of "animate implicitplot (a heart shape)". I tried to send a reply within this theme, but for some reason, my message is not loaded

I haven't posted here in a while, and am not sure how to enter things, so this may not post correctly. But what I need help with is how to animate the following so that they will actually "draw" the heart shaped implicit plots either from the top down, or the bottom up, or however else might look interesting.

Thanks in advance.

animate and polarplot

February 07 2012 by davidp 5

how do you draw a function r=sin(alpha) using animate and "polarplot".

Suppose that you wish to animate the whole view of a plot. By whole view, I mean that it includes the axes and is not just a rotation of a plotted object such as a surface.

One simple way to do this is to call plots:-animate (or plots:-display on a list of plots supplied in a list, with its `insequence=true` option). The option `orientation` would contain the parameter that governs the animation (or generates the sequence).

But that entails recreating the same plot each time. The plot data might not even change. The key thing that changes is the ORIENTATION() descriptor within each 3d plot object in the reulting data structure. So this is inefficient in two key ways, in the worst case scenario.

1) It may even compute the plot's numeric results, as many times as there are frames in the resulting animation.

2) It stores as many instances of the grid of computed numeric data as there are frames.

We'd like to do better, if possible, reducing down to a single computation of the data, and a single instance of storage of a grid of data.

To keep this understandable, I'll consider the simple case of plotting a single 3d surface. More complicated cases can be handled with revisions to the techniques.

Avoiding problem 1) can be done in more than one way. Instead of plotting an expression, a procedure could be plotted, where that procedure has `option remember` so that it automatically stores computed results an immediately returns precomputed stored result when the arguments (x and y values) have been used already.

Another way to avoid problem 1) is to generate the unrotated plot once, and then to use plottools:-rotate to generate the other grids without necessitating recomputation of the surface. But this rotates only objects in the plot, and does alter the view of the axes.

But both 1) and 2) can be solved together by simply re-using the grid of computed data from an initial plot3d call, and then constructing each frame's plot data structure component "manually". The only thing that has to change, in each, is the ORIENTATION(...) subobject.

At 300 frames, the difference in the following example (Intel i7, Windows 7 Pro 64bit, Maple 15.01) is a 10-fold speedup and a seven-fold reduction is memory allocation, for the creation of the animation structure. I'm not inlining all the plots into this post, as they all look the same.

restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

plots:-animate(plot3d,[P,x=-5..5,y=-5..5,orientation=[A,45,45],
                       axes=normal,labels=[x,y,z]],
               A=0..360,frames=300);

time()-st,kernelopts(bytesalloc)-ba;

                                1.217, 25685408
restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

g:=plot3d(P,x=-5..5,y=-5..5,orientation=[-47,666,-47],
          axes=normal,labels=[x,y,z]):

plots:-display([seq(PLOT3D(GRID(op([1,1..2],g),op([1,3],g)),
                           remove(type,[op(g)],
                                  specfunc(anything,{GRID,ORIENTATION}))[],
                           ORIENTATION(A,45,45)),
                    A=0..360,360.0/300)],
               insequence=true);

time()-st,kernelopts(bytesalloc)-ba;

                                0.125, 3538296

By creating the entire animation data structure manually, we can get a further factor of 3 improvement in speed and a further factor of 3 reduction in memory allocation.

restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

g:=plot3d(P,x=-5..5,y=-5..5,orientation=[-47,666,-47],
          axes=normal,labels=[x,y,z]):

PLOT3D(ANIMATE(seq([GRID(op([1,1..2],g),op([1,3],g)),
                           remove(type,[op(g)],
                                  specfunc(anything,{GRID,ORIENTATION}))[],
                           ORIENTATION(A,45,45)],
                    A=0..360,360.0/300)));

time()-st,kernelopts(bytesalloc)-ba;

                                0.046, 1179432                            

Unfortunately, control over the orientation is missing from Plot Components, otherwise such an "animation" could be programmed into a Button. That might be a nice functionality improvement, although it wouldn't be very nice unless accompanied by a way to export all a Plot Component's views to GIF (or mpeg!).

The above example produces animations each of 300 frames. Here's a 60-frame version:

3D animation of rotation

January 24 2012 by Bibinou 41 Maple 13

Hello everybody,

I represented a polynomial P type:
P := a + b*x + c*x^2-d*y + e*y^2 + f*x*y
(where a, b, c, d, e, d, are real)

using fucntion pointplot3D
G1 := plot3d(P, x = 0 .. 5, y = -0,5 .. 1);
display(G1);

I represented this polynomial which look like a paraboloid.

I'm just wondering if I can animate continuously...

Hi everybody,

How can i plot a vector field and an animated curve on the same plotting window ?

Regards.

lol37.

Hello, can you help me? I need to draw a simple model of solar system (9 planets around the sun). I tried to draw planets with

> a[1] := animate(implicitplot3d,

                            [

                    ...

I want to have a Plot component display animations, controlled by a button. I want each click
of the button to show a new animation.

So e.g. the Action when Clicked for the button might be something like this (for animations alternately in blue and red):

use DocumentTools, plots in

if cc = red then cc:= blue else cc:= red fi;
Do(%Plot0 =animate(plot,[sin(x+t),t=0..Pi,colour=cc],x=0..Pi,frames=4));
SetProperty(Plot0,play,true,refresh=true)

I wish to display in 2D a vertical arrow with amplitude oscillating sinusoidally between 1 and -1.  Hours studying help files and attempting to craft a command to produce this simple result yield nothing but unhelpful error messages. Please provide the command that will do it.

1 2 3 Page 1 of 3