animeplot

10 Reputation

3 Badges

2 years, 95 days

MaplePrimes Activity


These are replies submitted by animeplot

@acer 

Thank you for your help. I will elaborate further on my previous question.  

I developed a Module that incorporates a procedure and a maplet. The procedure is called Ball1:=proc(wtplt) that eventually produces an entity called Ballout, the type of which depends on the variable (wtplt) such that 

The following (shown in red) is inside the procedure:

if (wtplt=dplt) then 

Ballout = display(seq(A[i],i= 1..n1),seq(R[i],i= 1..n1),seq(Rd[i],i= 1..n1),scaling = constrained, axes = none);

end if 

 

if (wtplt=aplt) then 

Ballout = PLOT(ANIMATE(seq([op(S[n])]$5, n=1..10)));

end if 

Now on the maplet I have two buttons, one is to make the procedure display the plot and the other is to make the same procedure animate some stored sequence S[n]

c1:= Button ("Run", Evaluate ('F' = 'display (Ball1 (dplt))')):
c2:= Button ("Animate", Evaluate ('F' = 'Ball1 (aplt)')):

Both to appear in the same plotter using the command 

p1:= Plotter ['F']():

 

When I click on button c1 (Run), the plot work just fine, but when I click on button c2 (Animate), the plotter shows the last frame of the animation only. 

My question is: how can I make the plotter show the animation. 

 

Rest regards
 

@Kitonum 

This one works. Thank you again for your help.

 

@Kitonum 

I ran the code:

restart;
L1:=s->[[0,0],[5,0],[2.5,s],[0,0]]:
L2:=s->[[2,0],[7,0],[4.5,s],[2,0]]:
L3:=s->[[4,0],[9,0],[6.5,s],[4,0]]:
A:=s->plot([L1(s),L2(s),L3(s)], color=red, scaling=constrained, axes=none):
N:=15:  
plots:-animate(plots:-display,[A(4-round(n))], n=0..N, frames=75, background=A(4));

 

 but it only shows the original three in the background with nothing going on except (n) running from 0 to N.

I am using Maple 13.

 

The answer was very helpful. 

restart;
L1:=s->[[0,0],[5,0],[2.5,s],[0,0]]:
L2:=s->[[2,0],[7,0],[4.5,s],[2,0]]:
L3:=s->[[4,0],[9,0],[6.5,s],[4,0]]:
A:=s->plot([L1(s),L2(s),L3(s)], color=red, scaling=constrained, axes=none):
N:=15:  
for n from 0 to N do
S[n]:=plots:-display([A(4), A(4-n)]):
od:
plots:-display(seq(S[n]$5, n=0..N), insequence=true);

Now imagine again that the lists L1, L2, and L3 contain hundreds or thousands of coordinates such that saving the new sequence of plots (S[n]:=plots:-display([A(4), A(4-n)]):is cumbersome and undesirable. Is it possible to plot the new isoceles triangles without saving their sequences in the background (Maple's memory)? 

Can the whole procedure be done using the "animate" command instead of plot+insequence (to be able to show traces)?

Thanks again for your much appreciated help 

@Kitonum 

 

Thanks again, that was very helpful. 

 

Best wishes.

Page 1 of 1