0
$\begingroup$

This is a follow up question to the original question: Original Question

The accepted solution (provided by @Mark McClure) can also be found in the original question. It is as follows.

u[x_, t_] = -(1/2) Cos[x - t]^2 + 1;
pics = Table[Plot[u[x, t], {x, -10, 10}, PlotRange -> {0, 1.5}, 
PlotStyle -> {Red, Thickness[0.005]}], {t, 0, 2 Pi, 2 Pi/50}]; 

Then, export as follows:

Export["anim.gif", pics]

Is there a way of creating a 3D animation from the 2D animation? Something along the lines of the following: Example

Thanks, Radz.

$\endgroup$
  • $\begingroup$ Dear @Kguler, Thanks. $\endgroup$ – Radz Aug 29 '14 at 7:27
3
$\begingroup$

Is there a way of creating a 3D animation from the 2D animation?

You have misunderstood the whole thing. An animation is simply a series of images that are displayed after one another. If you want a 3D animation, make the frames in 3D. If you want 2D, make the frames in 2D.

u[x_, t_] = -(1/2) Cos[x - t]^2 + 1;
frames = Table[Plot3D[u[x, t], {x, -2 Pi, 2 Pi}, {y, -5, 5}, Axes -> False, Boxed -> False], {t, 0, 2 Pi, 2 Pi/50}];
Export["3danimation.gif", frames]

3D animation

$\endgroup$
  • $\begingroup$ Dear @Pickett, Thank you. $\endgroup$ – Radz Aug 29 '14 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.