The Wavy Snake

Here is some fun with Mathematica. I want to produce an animation of a wavy snake that changes colour. First, we define a function:

f[x_, n_]  =  Cos[3  x  +  n]  + Sin[4  x + n]

Then, we create a series of plots. When the plots are done, double click on any one of them to start the animation! You can control the speed of the animation using the number keys on the numeric keypad. If you choose top speed, you can easily see the beats for this function. There is also a small control panel at the bottom of the Mathematica window which controls the animation.

You can play around with this format to make other animations.

nplots = 15
Table[
      Plot[f[x, n], {x, 0, 8  Pi}, Axes -> False, 
        PlotStyle -> {{Thickness[0.005], Hue[n/nplots]}}], {n, 0, 
        2  Pi - 1  Pi/nplots, 2  Pi/nplots}]

Here is a really fabulously interesting bouncing ball.

region  =  
        Plot[-0.02, {x, -1, 1}, PlotRange -> {-0.1, 1}, 
          Axes -> False];
nplots = 30;

Table[
      Show[region, Graphics[Disk[{0, Exp[-n^2/50] Sin[n]^2}, 0.02]]], {n, 
        Pi/2, 6  Pi , 6  Pi/nplots}]

I am a complete rookie at this sort of stuff. Check out this website for some absolutely fantastic examples of Mathematica graphics:
http://www.unca.edu/~mcmcclur/mathematicaGraphics/