Items tagged with animation animation Tagged Items Feed

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!

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




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.



Dasayeva Diana, 6th form



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


I accidentally came across a nice Mma animation. Unfortunately, I am able to present only few frames of it in MaplePrimes. See two inconsecutive frames below


I find this animation very deep. I don't remember something similar. It looks like an iterative
map shown in its dynamics. Not being an expert in Mathematica, I don't understand the machinery of the generating code.
n = 1000;
r := RandomInteger[{1, n}];
f := (#/(.01 + Sqrt[#.#])) & /@ (x[[#]] - x) &;
s := With[{r1 = r}, p[[r1]] = r; q[[r1]] = r];
x = RandomReal[{-1, 1}, {n, 2}];
{p, q} = RandomInteger[{1, n}, {2, n}];
Graphics[{PointSize[0.007], Dynamic[If[r < 100, s];
Point[x = 0.995 x + 0.02 f[p] - 0.01 f[q]]]}, PlotRange -> 2]
Here is its fragment translated into Maple:
>FromMma(" (#/(.01 + Sqrt[#.#])) & /@ (x[[#]] - x) &;");
map(unapply(_Z1/(0.1e-1+sqrt(_Z1 . _Z1)), _Z1), unapply(x(_Z1)-x, _Z1))
To my regret,
>FromMma(" n = 1000;
r := RandomInteger[{1, n}];
f := (#/(.01 + Sqrt[#.#])) & /@ (x[[#]] - x) &;
s := With[{r1 = r}, p[[r1]] = r; q[[r1]] = r];
x = RandomReal[{-1, 1}, {n, 2}];
{p, q} = RandomInteger[{1, n}, {2, n}];
Graphics[{PointSize[0.007], Dynamic[If[r < 100, s];
Point[x = 0.995 x + 0.02 f[p] - 0.01 f[q]]]}, PlotRange -> 2]");
Error, (in MmaTranslator:-FromMma) incorrect syntax (at position 11) in last character of "...0)

I don't know the use to me of having PDF exports having animations requiring huge emails since I don't own website. Yet, I've been fooling with Apple textbook maker app that has movie imort to PDFs. Someday, I'll use google drive links...

So, action item, maybe Maple would like to have a worksheet drop in to this apple textbook app Like movies. I hope it's easy from Apple taunting html5.

     Example of the equidistant surface at a distance of 0.25 to the surface
-0.1 * (sin (4 * x1) + sin (3 * x2 + x3) + sin (2 * x2)) = 0
Constructed on the basis of universal parameterization of surfaces. 

Rotational motion mechanism with quasi stops      


As seen on tv.

Having issues with animating the movement of two fielders, (25m apart on a straight line) when a baseball is struck towards them. they're on the y axis when they should be on the x.... and they should be green and brown dots, not lines.....

The mechanism of transport of the material of the sewing machine M 1022 class: mathematical animation. 

I have an equation for r(t) that involves 3 (slidable) constants; an equation for phi(t) that involves the same three constants and is written in terms of arctan; theta is a slidable constant. How do I plot this on an x,y,z plot? I want an animation in terms of t.

1 2 3 4 5 6 7 Page 1 of 7