## How to animate the rotation of a PLOT3D data struc...

I have Imported a CAD model (.sty) into maple. What I want to do is rotate the model along several axes. At first I want to rotate it around its center. This can be done via

`rotate(Zylinder, 2, 3, 56)`

where Zylinder is the Object I importet via

`Zylinder := Import("C:/...")`

this works fine, but I want the rotation to be a continuous animation. I tried:

`animate(rotate(Zylinder, A, 0, 0), A = 0 .. 360)`

but that does not work. Can you please tell me how to make it work? And it would be great if the aproach would work for rotations around an axis away from the center, too.

## Similar triangles animation...

Hello,

i look for an Maple animation about similar triangles? Thank you

## Fun with the Maple Leaf – Celebrate Canada 150!

by: Maple 2017

This Saturday is Canada’s 150th birthday. As you can imagine, the country has been paying a lot more attention to this year’s anniversary than our usual low key approach, and as a Canadian company, we at Maplesoft decided to join in the fun.

And what better way for Maplesoft to celebrate Canada’s birthday than to create a maple leaf in Maple!

So here is a maple leaf inspired by the Canada 150 logo, which was created by Ariana Cuvin, a student at the University of Waterloo and former co-op here at Maplesoft:

Here’s the code to reproduce this plot (more details can be found in this follow up post):

p:=thickness=5,color="#DC2828":
plots:-display(

plot([[-.216,-.216],[0,0],[-.216,.216],[-.81,0],[-.216,-.216]],p),
plot([[-.55,.095],[-.733,.236],[-.49,.245]],p),
plot([[-.376,0],[0,0],[0,.376],[-.705,.705],[-.376,0]],p),
plot([[-.342,.536],[-.355,.859],[-.138,.622]],p),
plot([[-.267,.267],[0,0],[.267,.267],[0,1],[-.267,.267]],p),
plot([[.342,.536],[.355,.859],[.138,.622]],p),
plot([[0.,.376],[0,0],[.376,0],[.705,.705],[0.,.376]],p),
plot([[.55,.095],[.733,.236],[.49,.245]],p),
plot([[.216,.216],[0,0],[.216,-.216],[.81,0],[.216,.216]],p),
plot([[0,-.5],[0,0]],p),

scaling=constrained,view=[-1..1,-.75..1.25],axes=box);

Know other ways to plot a maple leaf in Maple?  If so, please share them below - we’d love to see them!

## Using the Explore command to produce more advanced...

Dear Maple users

I was using the animation command to create an animation consisting of a running sine curve with a ball following the curve, as shown below. I wonder if it is possible to create it with the Explore command too? Or is this command more limited? I need to be able to add more animations, like I can with the display command ...

Regards, Erik.

## How do I make a 3D animation of a matrix plot?...

I am using matrices to input data in order to plot it on a surface plot. Is it then possible to export an animation of this graph rotating around an axis?

My matrix is 40 x 3 Matrix

Thanks :)

## Lazy caterer's animation...

Edited.

Fellas

I'm wondering how to produce the graphic in the

https://en.wikipedia.org/wiki/Lazy_caterer's_sequence.

my attempt:
caterers.mw

## how to animate like weather diagram?...

with(DEtools):
rho := 0.1;
w0 := 2;
sys := {diff(x(t),t) = y(t),diff(y(t),t) = -2*rho*y - w0^2*x};
DEplot(sys, [x(t), y(t)], t = 0 .. 12, [[x(0) = 1, y(0) = 0]]);

i use flow above, would like to plot a circle move from right hand side to left hand side

and see how a circle influence the flow diagram in animation like weather diagram

## How to rotate a 3d plot or 3d animation plot in th...

I uploaded this file AnimationTest.mw to the Maple Cloud. One a 3d animation and one just a 3d plot. When I open the file in the Maple Cloud from my browser,  I cannot rotate either plot with the mouse. Is there a way to change the worksheets so rotation from the browser will be possible?

## How to place a 3-d animation on the web so that on...

I have created several animated 3-d figures using Maple.  Exporting an animation as a gif file I find that with, for example, Quicktime, I can run the animation. However I cannot rotate the 3-d figures using Quicktime.  Is there some other way to make such animations available to people not having Maple, so they can rotate the figure as well as run the animation? I would appreciate any ideas about this.

## Combine multiple views in 3D animation...

Dear all,

My script has multiple animations, in which the range of the variable is larger then I wish to see. Therefore, I have used the view=[x1..x2,y1..y2] command, which has different values for every plot. Plotted seperately, this gives me exactly what I want. However, if I combine the plots using display(A,B,C) they loose their individual views. Instead, maple chooses the view of plot A, and plots B an C in the range defined by view A.

Is there a way to combine plots and still maintain individual views, within the largest view?

Kind regards,
Bastiaan Overdorp

## Precomputing data for animation...

I'm trying to make 3D-animation and the procedure takes an enormous amount of time to make frames for it. It took over 10 minutes to create animation consisting of 50 frames (over t=0..1000). If I increase the number of frames or range of time, it just wouldn't reach the end of calculation (keeps evaluating till I lose patience or my faith in Maple)

Is there a way to somehow precompute data for animation (maybe store it somewhere) so that it could gather it from there and the animation construction itself would be faster?

Here's the code: ClassicalTrajectoriesH2X_harm.mw (animation is in the end of the file)

P.S. I have Asus X555LJ; Intel Core i5-5200U, 2.2GHz; 12Gb RAM, for the last few months it presented itself as a rather fast piece of machinery.

## Procedures for two animations

by: Maple 2016

We assume that the radius of the outer stationary circle is  1. If we set the radius  x  of the inner stationary circle, all the other circles are uniquely determined by solving the system Sys.  Should be  x<=1/3 . If  x=1/3  then all the inner circles have a radius  1/3 . The following picture explains the meaning of symbols in the procedure Circles:

Circles:=proc(x)

local OO, O1, O2, O3, O4, O2x, O2y, O3x, O3y, OT, T1, T2, T3, s, t, dist, Sys, Sol, sol, y, u, v, z, C0, R0, P;

uses plottools, plots;

OO:=[0,0]: O1:=[x+y,0]: O2:=[O2x,O2y]: O3:=[O3x,O3y]: O4:=[-x-z,0]: OT:=[x+2*y-1,0]:

T1:=(O2*~y+O1*~u)/~(y+u): T2:=(O3*~u+O2*~v)/~(u+v): T3:=(O4*~v+O3*~z)/~(v+z):

solve({(T2-T1)[1]*(s-((T1+T2)/2)[1])+(T2-T1)[2]*(t-((T1+T2)/2)[2])=0, (T3-T2)[1]*(s-((T2+T3)/2)[1])+(T3-T2)[2]*(t-((T3+T2)/2)[2])=0}, {s,t}):

assign(%);

dist:=(A,B)->sqrt((B[1]-A[1])^2+(B[2]-A[2])^2):

Sys:={dist(O1,O2)^2=(y+u)^2, dist(OO,O2)^2=(x+u)^2, dist(O2,O3)^2=(u+v)^2, dist(OO,O3)^2=(x+v)^2, dist(O3,O4)^2=(z+v)^2, x+y+z=1, dist(O2,OT)^2=(1-u)^2, dist(O3,OT)^2=(1-v)^2};

Sol:=op~([allvalues([solve(Sys)])]);

sol:=select(i->is(eval(convert([y>0,u>0,v>0,z>0,O2y>0,x<=y,u<=y,v<=u,z<=v],`and`),i)), Sol)[];

assign(sol);

O1:=[x+y,0]: O2:=[O2x,O2y]: O3:=[O3x,O3y]: O4:=[-x-z,0]: OT:=[x+2*y-1,0]:

C0:=eval([s,t],sol);

R0:=eval(dist(T1,C0),sol):

P:=proc(phi)

local eq, r1, r, R, Ot, El, i, S, s, t, P1, P2;

uses plots,plottools;

eq:=1-dist([r*cos(s),r*sin(s)],OT)=r-x;

r1:=solve(eq,r);

r:=eval(r1,s=phi);

R[1]:=evalf(r-x);

Ot[1]:=evalf([r*cos(phi),r*sin(phi)]);

El:=plot([r1*cos(s),r1*sin(s),s=0..2*Pi],color="Green",thickness=3);

for i from 2 to 6 do

S:=[solve({1-dist(OT,[s,t])=dist(Ot[i-1],[s,t])-R[i-1], 1-dist(OT,[s,t])=dist(OO,[s,t])-x})];

P1:=eval([s,t],S[1]); P2:=eval([s,t],S[2]);

Ot[i]:=`if`(evalf(Ot[i-1][1]*P1[2]-Ot[i-1][2]*P1[1])>0,P1,P2);

R[i]:=dist(Ot[i],OO)-x;

od;

display(El,seq(disk(Ot[k],0.012),k=1..6),circle(C0,R0,color=gold,thickness=3),circle([x+2*y-1,0],1, color=blue,thickness=4), circle(OO,x, color=red,thickness=4), seq(circle(Ot[k],R[k], thickness=3),k=1..6), scaling=constrained, axes=none);

end proc:

animate(P,[phi], phi=0..Pi, frames=120);

end proc:

Example of use (I got  x=0.22  just by measuring the ruler displayed original animation):

Circles(0.22);

The curve on the following animation is an astroid (a special case of hypocycloid). See wiki for details. Hypocycloid procedure creates animation for any hypocycloid.  Parameters of the procedure: R is the radius of the outer circle, r is the radius of the inner circle.

Hypocycloid:=proc(R,r)

local A, B, f, g, F;

uses plots,plottools;

A:=circle(R,color=green,thickness=4):

B:=display(circle([R-r,0],r,color=red,thickness=4),line([R-r,0],[R,0],color=red,thickness=4)):

f:=t->plot([(R-r)*cos(s)+r*cos((R-r)/r*s),(R-r)*sin(s)-r*sin((R-r)/r*s),s=0..t],color=blue,thickness=4):

g:=t->rotate(rotate(B,-R/r*t,[R-r,0]),t):

F:=t->display(A,f(t),g(t),scaling=constrained):

animate(F,[t], t=0..2*Pi*denom(R/r), frames=90);

end proc:

Examples of use:

Hypocycloid(4,1);

Hypocycloid(5,3);

## how to get the coordinate of a swirl ...

http://mathforum.org/kb/message.jspa?messageID=685890

i find equation above

for ii from 0 by 5 to 365 do
eq1 := x^2 + y^2 = arccos(x/r);
eq2 := y = evalf((atan(-1) - ii*Pi/180)/Pi)*(-1.0)*x;
xy := fsolve({eq1, eq2});
print("M",rhs(xy[1]),rhs(xy[2]),","):
od:

but i do not understand how to set r

i use a line scanning 365 degrees to get the path of swirl

would like to get path data for c# WPF animation

but this method may have multiple solution because an intersection of swirl

and a line can have multiple points

## Attempt to create an animation zooming in on axis...

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)

 > restart;
 > with(plottools): 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,                                               floor(128*k/max_frame),                                               floor(255*k/max_frame)                                               ]),                     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,                                      MapleTA:-Builtin:-strcat("frame_",                                                               convert(k, string),                                                               ".jpg")                                     ]);     # 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"])                                             ); ssystem(command_for_gif);
 >

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

`?DocumentTools:-Components:-VideoPlayer`

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!