Animation and Sound

Index

This index gives a list of keywords that are associated with various cells in this Notebook. If you Command-Double-click one of the keywords below,  Mathematica  will find the cell associated with that keyword, select it, and display it in the center of  your window.

Animation 
Play

Animation and Sound

Syntax (see pages 174, 176 and the Mathematica  User Manual)

Generating a List of Graphics Objects for Animation

Do[Plot3D[f,{x, xmin, xmax },{y, ymin, ymax }],           {n, nmin,  nmax }]]   with f  depending on n , generates a sequence of 3-D plots.

Do[ParametricPlot3D[f,{x, xmin, xmax },                 {y, ymin, ymax }],{n, nmin, nmax }]   generates a sequence of parametric plots.

Play

Play[f, {t, 0, tmax }]   plays a sound with amplitude f  as a function of time t  in seconds.

A Note on Animation

You can use sequences of graphics cells in a Notebook as frames in a “movie”.
To view the movie, first scroll until the first graphics cell is completely visible in the window.  (The movie is shown in this cell.) After the first graphics cell is completely visible, double-click the first picture in the sequence to start the movie.  Click again anywhere to stop.

Animation

Due to disk space limitations, this is a simple black and white example.

Do[Plot3D[Sin[x y], {x, -n, n}, {y, -n, n}], 
   {n, 1, 3, 3/23}];

A Note on Sound

Mathematica  can produce not only graphics but also sound. Just as you can use Plot to plot a function, you can also use Play to “play” a function. To play a sound, double-click the small, speaker-shaped icon at the top of the sound cell bracket.

Pure Sound

This plays a pure tone with a frequency of 440 hertz for one second.

Play[Sin[2Pi 440t], {t, 0, 1}]

Complex Sound

This plays a more complex sound.

Play[Sin[1000 t ( 1 + 0.1 Sin[100 t] Sin[20 t])], 
		{t, 0, 2}];