Hello,
I would like to animate two sequences side-by-side, the whole plot being a single animation. I do not want two side-by-side animations, but a single animation where each frame shows two side-by-side plots. It should be something like:
T:=4:step:=10:
A:=[seq(plot(cos(x+t/steps),x=0..1),t=0..T*step)]: B:=[seq(plot(sin(x+t/steps),x=0..1),t=0..T*step)]:
animate(display(Array([A, B])),insequence=true);
Of course, what's indicated above does not work :( Would you please have an idea?
Thanks!
On Monday, March 18, 2019 at 11:52:13 AM UTC-4, pluto...@gmail.com wrote:
Hello,
I would like to animate two sequences side-by-side, the whole plot being a single animation. I do not want two side-by-side animations, but a single animation where each frame shows two side-by-side plots. It should be something like:
T:=4:step:=10:
A:=[seq(plot(cos(x+t/steps),x=0..1),t=0..T*step)]: B:=[seq(plot(sin(x+t/steps),x=0..1),t=0..T*step)]: animate(display(Array([A, B])),insequence=true);
Of course, what's indicated above does not work :( Would you please have an idea?
Thanks!
Here are the two basic ways:
restart;
T:=4:
step:=10:
numframes:=100:
# 1) Use the plots:-animate command, and delay the evaluation
# of the extra arguments (until `t` gets numeric values).
plots:-animate(plots:-display,
['Array([plot(sin(x+t),x=0..1),
plot(cos(x+t),x=0..1)])'],
t=0..T*step, frames=numframes);
# 2) Generate a sequence of them, and then use
# the plots:-display command with its insequence option
S := [seq(plots:-display(Array([plot(sin(x+t),x=0..1),
plot(cos(x+t),x=0..1)])),
t=0..T*step, (T*step-0)/(numframes-1))]:
nops(S); # check we got 100 frames
plots:-display(S, insequence=true);
Using either of those two methods then, upon clicking for focus in the plot area, the play button in the main menubar causes the Array of plots to play together.
I used Maple 2018.2, and if it doesn't work for you then please indicate your version and platform.
Hello,
I would like to animate two sequences side-by-side, the whole plot being a single animation. I do not want two side-by-side animations, but a single animation where each frame shows two side-by-side plots. It should be something like:
T:=4:step:=10:
A:=[seq(plot(cos(x+t/steps),x=0..1),t=0..T*step)]: B:=[seq(plot(sin(x+t/steps),x=0..1),t=0..T*step)]:
animate(display(Array([A, B])),insequence=true);
Of course, what's indicated above does not work :( Would you please have an idea?
Thanks!
On Monday, March 18, 2019 at 11:52:13 AM UTC-4, pluto...@gmail.com wrote:
Hello,
I would like to animate two sequences side-by-side, the whole plot being a single animation. I do not want two side-by-side animations, but a single animation where each frame shows two side-by-side plots. It should be something like:
T:=4:step:=10:
A:=[seq(plot(cos(x+t/steps),x=0..1),t=0..T*step)]: B:=[seq(plot(sin(x+t/steps),x=0..1),t=0..T*step)]: animate(display(Array([A, B])),insequence=true);
Of course, what's indicated above does not work :( Would you please have an idea?
Thanks!
Both methods also work for me using Maple 16.01.
yes, your suggestions work in the sense that both sequences play together in Maple. However, I want to export them together in a single gif file. What I see currently is that the two sequences can only be exported separately. I could certainly useanother piece of software to put the two gif file in a single one. However, if there is a solution in Maple, I would be interested.
On Tuesday, March 19, 2019 at 6:51:52 AM UTC-4, pluto...@gmail.com wrote:another piece of software to put the two gif file in a single one. However, if there is a solution in Maple, I would be interested.
yes, your suggestions work in the sense that both sequences play together in Maple. However, I want to export them together in a single gif file. What I see currently is that the two sequences can only be exported separately. I could certainly use
Why don't people state what they *really* want to accomplish at the beginning?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 25:38:34 |
Calls: | 6,646 |
Calls today: | 1 |
Files: | 12,193 |
Messages: | 5,327,801 |