How do you make an animation with Mathematica?

In summary, the problem is that when you collapse the cell down to one plot, the image doesn't look correct because it is showing the plots for each cell on the same graph. To fix the problem, you need to double click the farthest right bracket and then the table will be collapsed down to one plot.
  • #1
Nusc
760
2

Homework Statement



How do you make an animation with Mathematica?

Homework Equations



Table[Plot3D[3Sech[(1/2)*(-t+x)]+12Sech[(1/2)*(-8t+2x)]+27Sech[(1/2)*(-27t+3x)],{x,0,10},{t,0,14},Axes->False,PlotRange->{0,10}],{t,0,9}] // Short

The Attempt at a Solution



My attempt above spits out a whole column of the same image. Do you know what's wrong?
 
Physics news on Phys.org
  • #2
After you get the entire table of plots, you should be able to collapse the cell down so you see only one plot. Then select the plot and, I believe, hit CTRL-Y. It's been a while, but it does work.

I don't have Mathematica on my work computer so I'll have to do it when I get home tonight.
 
  • #3
"collapse the cell down so you see only one plot."


How do you do that?
 
  • #4
Try double clicking an image, it should generate an animated sequence based on the rest of your plotted results.
 
  • #5
Nusc said:
"collapse the cell down so you see only one plot."


How do you do that?
On the far, right hand side of each cell there is a series of brackets that have a small triangle attached. If the triangle points down, the cell is expanded. If the triangle points up the cell is collapsed. For the table plot, you want to double click the farthest right bracket so that it looks like you have only one plot on the screen.

Here's a picture that shows what I am talking about:
http://www.atpm.com/10.02/images/atpo-28-mathematica.gif
 
  • #6
Okay good. I got what I wanted:

\!\(Table[Plot3D[3\
Sech[1\/2\ \((\(-t\) + x)\)] + 12\ Sech[1\/2\ \((\(-8\)\ t + 2\ x)\)] +
27\ Sech[
1\/2\ \((\(-27\)\ t + 3\ x)\)], {x,
0, 60}, {t, 0, x}, PlotRange -> {{0, 60}, {0,
60}, {0, 2}}], {x, 0, 60}]\ // Short\)

However I'm not happy with the way it looks:

\!\(Plot3D[3\ Sech[1\/2\ \((\(-t\) +
x)\)] + 12\ Sech[1\/2\ \((\(-8\)\ t + 2\ x)\)] + 27\
Sech[1\/2\ \((\(-27\)\ t + 3\ x)\)], {x, 0, 10}, {t, 0, 14}]\)

Then

Show[%, ViewPoint -> {1.2, 1.2, 1.2}]
 

FAQ: How do you make an animation with Mathematica?

1. How do you import graphics into Mathematica for animation?

To import graphics into Mathematica for animation, you can use the Import function and specify the file path or URL of your graphics file. Alternatively, you can use the URLExecute function to directly import images from the internet.

2. Can you use Mathematica to create 3D animations?

Yes, Mathematica has built-in functions such as Animate and Manipulate that allow you to create 3D animations. You can also use the Graphics3D function to create 3D graphics and then use the Animate function to animate them.

3. How do you control the speed of an animation in Mathematica?

You can control the speed of an animation in Mathematica by specifying the AnimationRate option in the Animate function. The value of this option determines the number of frames displayed per second.

4. Can you export animations created in Mathematica to other file formats?

Yes, you can export animations created in Mathematica to various file formats such as GIF, AVI, and QuickTime. Simply use the Export function and specify the desired file format in the file name.

5. Is it possible to add sound or music to an animation in Mathematica?

Yes, you can add sound or music to an animation in Mathematica by using the Sound function and specifying the audio file path or URL. You can also use the SoundNote function to create musical notes and add them to your animation.

Similar threads

Replies
1
Views
833
Replies
4
Views
2K
Replies
12
Views
2K
Replies
2
Views
4K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
1
Views
3K
Replies
2
Views
1K
Replies
4
Views
5K
Back
Top