Mathematica Animation for power point?

In summary: FPS (frames per second). For example, if you have a file with 10 frames per second, you can change the AnimationRepetitions to 10 and have a smoother animation.
  • #1
Wesleytf
32
0
Is there a way to animate and export a 3D plot such that it rotates about the z axis automatically? A friend is doing a presentation and I'd like to make some animated files of the 3D plots we've been making to include in a power-point. I've looked through help files and some google searches and only been able to find animation for parameters.
 
Physics news on Phys.org
  • #2
The default ViewPoint is:

In[1]:= ViewPoint/.Options[Plot3D]
Out[1]= {1.3,-2.4,2.}

We hit it with a rotation about the z-axis and animate. Note that I fixed the ViewAngle so that the graphics does not zoom in and out as the projection of the plot fits better and worse in the rectangular bounding box.

Animate[Plot3D[Sin[x]Sin[y],{x,0,2Pi},{y,0,2Pi},PlotRange->1,Ticks->None,ViewPoint->{1.3 Cos[a]-2.4Sin[a],-2.4 Cos[a]-1.3 Sin[a],2},ViewAngle->20*Degree],{a,0,2\[Pi]}]
 
  • #3
To export, there is a few different ways.

g = Animate[Plot3D[Sin[x]Sin[y],{x,0,2Pi},{y,0,2Pi},PlotRange->1,Ticks->None,
ViewPoint->{1.3 Cos[a]-2.4Sin[a],-2.4 Cos[a]-1.3 Sin[a],2},ViewAngle->20*Degree],
{a,0,2\[Pi],\[Pi]/10}, AnimationRepetitions->1,AnimationDirection->Forward]

Then export to a video filetype, eg "avi", "mov", "swf"
$HomeDirectory is the user's home directory.
Another useful directory is NotebookDirectory[]

Export[ToFileName[$HomeDirectory,"test.swf"],g]

The above export has the animation slider and frame/panel in it. You can get rid of the panel by using Paneled -> False. To get rid of the slider is more difficult. One solution - that also gives you more control is to create a list of frames:

gTable=Table[Plot3D[Sin[x]Sin[y],{x,0,2Pi},{y,0,2Pi},PlotRange->1,Ticks->None,ViewPoint->{1.3 Cos[a]-2.4Sin[a],-2.4 Cos[a]-1.3 Sin[a],2},ViewAngle->20*Degree],{a,0,2\[Pi],\[Pi]/10}];

This can be animated using ListAnimate and exported using, eg as an animated gif:

Export[ToFileName[$HomeDirectory,"gTable.gif"],gTable,ImageSize->350];

To get the best control, you can export each individual frame as an image and animate using an external program. An example is http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/474806f64be15759" .
 
Last edited by a moderator:
  • #4
alright, I've got one plot spinning around(thanks so much for that snippet)--is it possible to do an overlay animation?
 
Last edited:
  • #5
I doubt that producing an overlay animation is built into mathematica.
You probably could make your own code to get mathematica to make one - but maybe an external specialised tool might be better...
 
  • #6
No worries--you've already helped a ton.
 
  • #7
Oh, I forgot to come back and say that you can in fact do an overlay if you define it as a single graphic. I had to install the old animate package to use the "SpinShow" command.

g3 = Show[plot1, plot2, plot3]

SpinShow[g3]
 
  • #8
Simon Tyler your method works really good but I'd like a smoother animation with more FPS. How can this be done?

Thank you so much!
 

Related to Mathematica Animation for power point?

1. How do I create an animation in Mathematica for PowerPoint?

To create an animation in Mathematica for PowerPoint, you can use the built-in Animate function. This function allows you to specify the parameters of your animation, such as the frames and time interval, and then export it as a GIF or AVI file that can be inserted into your PowerPoint presentation.

2. Can I customize the appearance of my Mathematica animation?

Yes, you can customize the appearance of your Mathematica animation by using various options within the Animate function. For example, you can change the color, size, and style of the animation elements, as well as add labels and annotations to enhance the visual presentation.

3. How can I control the speed of my Mathematica animation?

The speed of your Mathematica animation can be controlled by adjusting the time interval parameter in the Animate function. You can also add pause and play buttons to your animation to give the viewer more control over the speed.

4. Is it possible to add sound to my Mathematica animation for PowerPoint?

Yes, you can add sound to your Mathematica animation for PowerPoint by using the Sound function within the Animate function. This allows you to synchronize sound effects or narration with your animation for a more dynamic presentation.

5. Can I export my Mathematica animation directly to PowerPoint?

No, Mathematica animations cannot be exported directly to PowerPoint. However, you can export your animation as a GIF or AVI file and then insert it into your PowerPoint presentation as a video or image.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
6K
  • Programming and Computer Science
Replies
4
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
2
Replies
52
Views
12K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
Back
Top