(*^ ::[ Information = "This is a Mathematica Notebook file. It contains ASCII text, and can be transferred by email, ftp, or other text-file transfer utility. It should be read or edited using a copy of Mathematica or MathReader. If you received this as email, use your mail application or copy/paste to save everything from the line containing (*^ down to the line containing ^*) into a plain text file. On some systems you may have to give the file a name ending with ".ma" to allow Mathematica to recognize it as a Notebook. The line below identifies what version of Mathematica created this file, but it can be opened using any other version as well."; FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2"; MacintoshStandardFontEncoding; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, cellOutline, groupLikeTitle, center, M18, O486, R65535, e8, 24, "Calculus"; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M18, O486, bold, R21845, G21845, B21845, e6, 12, "Calculus"; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M18, O486, R21845, G21845, B21845, e6, 12, "Calculus"; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M18, O486, bold, R21845, G21845, B21845, a10, 12, "Calculus"; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M18, O486, bold, R21845, G21845, B21845, a10, 12, "Calculus"; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, O486, bold, R21845, G21845, B21845, a10, 12, "Calculus"; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, 12, "Calculus"; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, B65535, 12, "Calculus"; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M36, N23, O486, bold, L-5, 12, "Courier"; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M36, N23, O486, L-5, 12, "Courier"; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M18, N23, O486, R65535, L-5, 12, "Courier"; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M18, N23, O486, L-5, 12, "Courier"; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M18, N23, O486, B65535, L-5, 12, "Courier"; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M18, O486, l19, o2, w378, h214, 12, "Courier"; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, italic, 10, "Geneva"; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M18, O486, 12, "Times"; fontset = leftheader, inactive, M18, O486, L2, 12, "Times"; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M18, O486, 12, "Times"; fontset = leftfooter, inactive, M18, O486, L2, 12, "Times"; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, 10, "Times"; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, 12, "Times"; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, 12, "Times"; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, whiteBox, M18, O486, bold, R21845, G21845, B21845, 12, "Calculus"; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M18, O486, R21845, G21845, B21845, 12, "Calculus"; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, O486, 12, "Times"; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M18, O486, 10, "Courier"; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M18, O486, 10, "Courier"; currentKernel; ] :[font = subsection; inactive; preserveAspect] Debra Woods :[font = subsection; inactive; preserveAspect] Contour Plots, and where they come from :[font = subsection; inactive; preserveAspect] Brief Description: :[font = text; inactive; pageBreakBelow; preserveAspect] This program demonstrates how a contour plot of a three dimensional surface is created and what it represents. :[font = text; inactive; Cclosed; preserveAspect; startGroup] Initialization cell ;[s] 2:0,1;19,0;20,-1; 2:1,26,19,Calculus,0,12,0,0,0;1,19,13,Calculus,2,10,0,0,0; :[font = input; initialization; preserveAspect; endGroup] *) Needs["Graphics`Colors`"] Off[ParametricPlot3D::ppcom] (* :[font = smalltext; inactive; preserveAspect] This program is a demonstration of how a contour plot of a three dimensional surface is created, and what it represents. Let us first consider the paraboloid f(x,y) = 2 xÛ + 2 yÛ as our three dimensional surface. The following code will show the plot. :[font = input; preserveAspect] (** Create three dimensional axes **) spacer = 0.2; h = 5; threedims = Graphics3D[{ {Line[{{-h,0,0},{h,0,0}}]}, Text["x",{h + spacer,0,0}], {Line[{{0,-h,0},{0,h,0}}]}, Text["y",{0, h + spacer,0}], {Line[{{0,0,-h},{0,0,h}}]}, Text["z",{0,0,h + spacer}]}]; (** Create three dimensional surface **) parab = ParametricPlot3D[{ Sqrt[2 u] Cos[t] , Sqrt[2 u] Sin[t],u}, {t,0,2 Pi},{u,0,4}, ViewPoint->{1.75,.5,1.7}, AspectRatio->Automatic ,AmbientLight->GrayLevel[1.0], LightSources->{}]; ;[s] 4:0,1;40,0;362,1;405,0;627,-1; 2:2,12,10,Courier,1,12,0,0,0;2,12,10,Courier,1,12,0,65535,65535; :[font = smalltext; inactive; pageBreak; preserveAspect] If we ask Mathematica for a contour plot of this surface we get: ;[s] 3:0,0;10,1;21,0;65,-1; 2:2,26,19,Calculus,0,12,0,0,65535;1,26,19,Calculus,2,12,0,0,65535; :[font = input; preserveAspect] ContourPlot[2 x^2 + 2 y^2,{x,-4,4},{y,-4,4}, ContourShading->False,Axes->True]; :[font = smalltext; inactive; preserveAspect] Notice that these particular level curves appear to be concentric circles. Let's see if we can now demonstrate where this comes from. The following creates the surface and some level curves on the surface parallel to the xy-plane. The animation will show the level curves falling off the surface and on to the xy-plane. :[font = input; preserveAspect] (** set contours **) circfunc[u_,t_,z_] = {Sqrt[2 u] Cos[t],Sqrt[2 u] Sin[t],z}; circs2[u_,z_] := ParametricPlot3D[Append[ circfunc[u,t,z], {Purple,Thickness[0.01]}], {t,0,2 Pi}, ViewPoint->{1.75,.5,1.7}, AspectRatio->Automatic ,DisplayFunction->Identity]; Clear[jj]; Table[ Show[threedims,parab,circs2[1,jj],circs2[2,2],circs2[3,3], Boxed->False,Axes->False, ViewPoint->{2.570, 2.413, 0.730}, AmbientLight->GrayLevel[1.0], LightSources->{}, PlotRange->{{-3,3},{-3,3},{0,9}}, DisplayFunction->$DisplayFunction] ,{jj,1,0,-1}]; Clear[jj]; Table[ Show[threedims,parab,circs2[1,0],circs2[2,jj],circs2[3,3], Boxed->False,Axes->False, ViewPoint->{2.570, 2.413, 0.730}, AmbientLight->GrayLevel[1.0], LightSources->{}, PlotRange->{{-3,3},{-3,3},{0,9}}, DisplayFunction->$DisplayFunction] ,{jj,2,0,-1}]; Clear[jj]; Table[ Show[threedims,parab,circs2[1,0],circs2[2,0],circs2[3,jj], Boxed->False,Axes->False, ViewPoint->{2.570, 2.413, 0.730}, PlotRange->{{-3,3},{-3,3},{0,9}}, AmbientLight->GrayLevel[1.0], LightSources->{}, DisplayFunction->$DisplayFunction] ,{jj,3,0,-1}]; ;[s] 2:0,1;23,0;1183,-1; 2:1,12,10,Courier,1,12,0,0,0;1,12,10,Courier,1,12,0,65535,65535; :[font = smalltext; inactive; preserveAspect] Select the above graphics and press command-y to animate. ;[s] 2:0,1;57,0;58,-1; 2:1,26,19,Calculus,0,12,0,0,65535;1,19,13,Calculus,0,10,65535,0,65535; :[font = smalltext; inactive; preserveAspect] What you can see from this is when the level curves fall off of the paraboloid, the land on the xy-plane and form the concentric circles which in turn creates the contour plot. For future projects, I plan to include more interesting surfaces and possibly try to generalize the program to solve for as many possible surfaces as it can. ^*)