Items tagged with animation

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?

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.

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

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. 

Is it possible to create several animation windows and run them simultaneously? 

I'm feeling that the answer to this question will be no, so I explain my problem. I have an animation of rotating object and I have some quantity that relates to the rotation. I want to see the rotation of object and the propagation of the graph of the quantity simultaneously. Maybe there is a way to somehow split the plot window in two, so in the left would be the rotation animation, and in the right would be the function animation.

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);

                                      

 

 

 Круги.mw

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

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)

link

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);

 

 

Download bug_report_maybe.mw

 

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!

how can i do this GIFs with maple ?

     Parallel curves on surfaces. The distance between the points of the curves is measured along the curves of intersection of the surface and perpendicular planes.
     (According to tradition, it also does not make sense.)

equidistant_curve_surface_MP.mw

 









 

 

      General description of the method of solving underdetermined systems of equations. As a particular application of the idea proposed a universal method  kinematic analysis for all kinds of linkage (lever) mechanisms. With the description and examples.
      The method can be used for powerful CAD linkages.

Description: Calculation_method_of_linkages.pdf

Attachment:
figure_1.mw
figure_2.mw

Or all in one
Calculation_method_of_linkages_(with_attach.).pdf


        Some examples of a much larger number calculated by the proposed method. Examples gathered here not to look for them on the forum and opportunity to demonstrate the method.  Among the examples, I think, there are very complicated.

https://vk.com/doc242471809_408704758
https://vk.com/doc242471809_408704572
https://vk.com/doc242471809_376439263
https://vk.com/doc242471809_402619761
https://vk.com/doc242471809_402610228
https://vk.com/doc242471809_401188803
https://vk.com/doc242471809_400465891
https://vk.com/doc242471809_400711315
https://vk.com/doc242471809_387358164
https://vk.com/doc242471809_380837279
https://vk.com/doc242471809_379935473
https://vk.com/doc242471809_380217387
https://vk.com/doc242471809_363266817
https://vk.com/doc242471809_353980472
https://vk.com/doc242471809_375452868
https://vk.com/doc242471809_353988163 
https://vk.com/doc242471809_353986884 
https://vk.com/doc242471809_353987119
https://vk.com/doc242471809_324249241
https://vk.com/doc242471809_324102889
https://vk.com/doc242471809_322219275
https://vk.com/doc242471809_437298137
https://vk.com/doc242471809_437308238
https://vk.com/doc242471809_437308241
https://vk.com/doc242471809_437308243
https://vk.com/doc242471809_437308245
https://vk.com/doc242471809_437308246
https://vk.com/doc242471809_437401651
https://vk.com/doc242471809_437664558

 

 

How to know how long the animation last and how to stop gif at the end.

I created a GIF from exporttool but I don't know how long is the animation ? I mean when it stops at the end of value. Or how to make GIF run as real time. because I make a gif for showing how a thing fall down from a attitude. And I need to show some figure like t (time) , h ( high ), v( speed ) thing like that while it falling down.

Thanks

 

Dasayeva Diana, 6th form

кит_Аним_Диана.mws

 

When I used exportplot in Maple2015 , the GIF file made easily after Enter. But when I use Engine.evaluate in Java jOpenMaple. it works for every command but exportplot. It didn't create any GIF file. I'm working on project must be use this for create animation by Maple but now that make big trouble. Any one to help this ?

VeHinhNemXien := proc(Alpha,Vbd)
  local Y,V0,alpha,X,ball,Xmax,bgr;
  with(plottools):
  with(plots):
  Y := unapply(V0*sin(alpha)*X/(V0*cos(alpha)) - 1/2*9.8*(X/(V0*cos(alpha)))^2,alpha,V0,X);
  ball := proc(x,y) plots[pointplot]([[x,y]],color=red,symbol=solidcircle,symbolsize=40) end proc;
  Xmax := 2*Vbd^2*sin(Alpha)*cos(Alpha)/9.8;
  bgr := plot(Y(Alpha,Vbd,X),X=0..Xmax,linestyle=[2]);
  animate(ball,[X,Y(Alpha,Vbd,X)],X=0..Xmax,scaling=constrained,labels=["Độ xa","Độ cao"],frames=60,background=bgr);
  exportplot(FileTools:-JoinPath([FileTools:-TemporaryDirectory(), "dothi.gif"]), animate(ball,[X,Y(Alpha,Vbd,X)],X=0..Xmax,scaling=constrained,labels=["Độ xa","Độ cao"],frames=60,background=bgr), gif);
end proc:

save VeHinhNemXien , "D:\\VeHinhNemXien.m";

in java file

String a[];
        a = new String[1];
        a[0] = "java";
        t = new Engine(a, new EngineCallBacksDefault(), null, null);

        t.restart();
        t.evaluate("read \"resources/VeHinhNemXien.m\";");

        t.evaluate(....query to call VeHinhNemXien to draw plot).

I checked carefully. When call it on Maple, it created GIF, but not in java. I checked queryString carefully.

New Info. I find that when I t.evaluate(....query to call VeHinhNemXien to draw plot) . this code make java stop there. that mean no code after this line can run.

 

Dear all,

I would like to find a way to make the reflection of a spherical wave inside a tube (a cylinder). You have herafter an exemple of a sphere increasing inside a tube, but without the reflections...

 

Any idea how to do this?

Thanks a lot for your help.

 

1 2 3 4 5 6 7 Page 1 of 8