Example 16
Surface, Contour, and Density Plots

Copyright „ 1993 by Bill Titus, Carleton College, 
Department of Physics and Astronomy, Northfield, MN  55057-4025
September 6, 1993

Topics and Skills

1.  Plot3D[] with options:  LightSource,  AxesLabel,  Boxed,  Axes,  PlotPoints,  and  ViewPoint.
2.  ContourPlot[]  with various options.
3.  DensityPlot[]  with various options.

Problem

A rubber sheet is stretched tight over the square boundary   0 < x < a   and      
0 < y < a.  The normal modes of oscillation for such a sheet are of the form

z[x, y] = cos(wt + a) sin(k1x) sin(k2y)

Here  a  is a phase constant and

k1 = 2pn/a,  k2 = 2pm/a,  w2 = c2(k12 + k22),

where  n  and  m  are positive integers, and  c  is the wave speed.  Examine graphically some of the normal modes of oscillation for this system.

Solution

Step 1 - For simplicity, assume that  a = 1,   c = 1,  and  a = 0.  Use the MMA command  Plot3D[]  to plot the surface of the sheet at time  t = 0  for the normal mode corresponding to  n = 1  and  m = 2.  Don't include any options in the plot command.

Comment 1

1.  Why might you want to evaluate  w  numerically before calling  Plot3D[]?

Step 2 - Examine the options for  Plot3D[]  and use some of them to label your axes and change to surface color to red.

Step 3 - Now choose options to remove the axes and the bounding box so that the sheet just sits there in free space.  Keep the surface color red, but increase the number of  PlotPoints  to  30  so that the surface is smoother.

Comment 3

1.  Note that if  Axes  is set to  False, then  AxesLabel  is simply ignored.
2.  The points are sampled uniformly.  The default number of points sampled is  15 x 15  so that  30 x 30  is four times as many sample points.

Step 4 -  Practice changing the viewpoint at which you observe the free surface.  You might want to use the 3D ViewPoint Selector to help you out.

Step 5 - Create a table of ten plots for  t   going from  0  to  2Pi/w.  Then animate your surface's motion as a function of time.  To speed up the drawing, set  PlotPoints  to  15.

Step 6 - Now make a contour plot of the surface at time  t = 0  for the normal mode corresponding to  n = 1  and  m = 1.  As before, assume that  a = 1,  c = 1,  and  a = 0.  Locate the appropriate MMA command to accomplish this task, and apply it without any of its options.

Step 7 -  Play with some of the options to  ContourPlot[]  to enchance the appearance of the normal mode plot.

Comment 7

1.  The options  ContourSmoothing  may significantly increases the time it takes to produce the contour plot.

Step 8 - Repeat Step 7, but now use the MMA command  DensityPlot[]  and some of its options.

Comment 8

1.  Be sure to try the option  Mesh -> False  and see what happens when you increase the number of  PlotPoints  to  100.
2.  Note that for printing to the laser printer that doesn't print in color, it's best to use shades of grays and not colors for your plots.

Save Your Notebook

Remove any output cells from this notebook and then use  Save As  to store your notebook under the name   myEx16.