(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 22868, 634]*) (*NotebookOutlinePosition[ 23573, 658]*) (* CellTagsIndexPosition[ 23529, 654]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Plotting over non-rectangular regions", "Title"], Cell[CellGroupData[{ Cell["Initialization", "Section"], Cell[BoxData[ \(<< Graphics`\)], "Input", InitializationCell->True], Cell[BoxData[ \(plot1\ = FilledPlot[{4\ - \ x\^2, 1}, {x, \(-\@3\), \@3}, PlotRange\ \[Rule] \ {{\(-\@3\), 2.3}, {0, 4}}, AspectRatio\ \[Rule] \ Automatic, Epilog\ \[Rule] \ {Text["\", { .6, .8}], Text[\*"\"\\"", {1.7, 3.5}]}, PlotLabel\ \[Rule] \ "\", Ticks\ \[Rule] \ {Automatic, {1, 2, 3, 4}}, DisplayFunction\ \[Rule] \ Identity]\)], "Input", InitializationCell->True], Cell[BoxData[ \(plot2\ = FilledPlot[{4\ - \ x\^2, Abs[x]/\@3}, {x, \(-\@3\), \@3}, PlotRange\ \[Rule] \ {{\(-2\), 2.3}, {0, 4}}, AspectRatio\ \[Rule] \ Automatic, Epilog\ \[Rule] \ {Text[\*"\"\\"", {1.3, .3}], Text[\*"\"\\"", {\(-1.4\), .3}], Text[\*"\"\\"", {1.7, 3.5}]}, PlotLabel\ \[Rule] \ "\", Ticks\ \[Rule] \ {Automatic, {1, 2, 3, 4}}, DisplayFunction\ \[Rule] \ Identity]\)], "Input", InitializationCell->True], Cell[BoxData[ RowBox[{\(botfn[x_]\), " ", ":=", " ", RowBox[{"Which", "[", RowBox[{\(x \[LessEqual] \ \(-\@2\)\), ",", \(x/\((\@2 - \@3)\) + \ \@2/\((\@2 - \@3)\)\), ",", \(\(-\@2\) < x < \@2\), ",", \(\@\(2 - x\^2\)\), ",", "True", ",", RowBox[{\(\(-x\)/\((\@2 - \@3)\)\), "+", " ", RowBox[{\(\@2/\((\@2 - \@3)\)\), Cell[""]}]}]}], "]"}]}]], "Input",\ InitializationCell->True], Cell[BoxData[ \(plot3\ = FilledPlot[{botfn[x], 4\ - \ x\^2}, {x, \(-\@3\), \@3}, PlotRange\ \[Rule] \ {{\(-2\), 2.3}, {0, 4}}, AspectRatio\ \[Rule] \ Automatic, Epilog\ \[Rule] \ {Text[\*"\"\\"", { .82, 1.6}], Text[\*"\"\\"", {1.7, 3.5}]}, PlotLabel\ \[Rule] \ "\", Ticks\ \[Rule] \ {Automatic, {1, 2, 3, 4}}, DisplayFunction\ \[Rule] \ Identity]\)], "Input", InitializationCell->True], Cell[BoxData[ \(xvar[a_, b_]\ := \ \(-1.4142135623730951`\) - 0.31783724519578205`\ a + \((\(\(2.8284271247461903`\)\(\ \[InvisibleSpace]\)\) + 0.6356744903915641`\ a)\)\ b\)], "Input", InitializationCell->True], Cell[BoxData[ \(yvar[a_, b_] := \ \(-2.8284271247461903`\)\ \((\(-1\) + a)\)\ \@\(\(-\((\(-1.`\) + b)\)\)\ \ \((\(-5.5511151231257815`*^-17\) + b)\)\) - 11.999999999999998`\ a\ \((\(-1.0773502691896257`\) + b)\)\ \((\(\(0.07735026918962581`\)\(\[InvisibleSpace]\)\) + b)\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(crvtbl\ = Chop[\ Table[{xvar[a, b], yvar[a, b]}, {a, 0, 1, .1}, {b, 0, 1, .04}], 10\^\(-7\)];\)\)], "Input", InitializationCell->True], Cell[BoxData[ \(\(lntbl\ = \ Chop[Table[{xvar[a, b], yvar[a, b]}, {b, 0, 1, .04}, {a, 0, 1, .1}], 10\^\(-7\)];\)\)], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["An overview", "Section"], Cell["\<\ Plotting over non-rectangular regions can always be accomplished \ using ParametricPlot3D, but it is often difficult to create the plot without \ some involved calculations. RegionPlot3D does the work for you if you can \ define the boundaries of the region by functions of the form y = f(x) or x = \ g(y).\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["How the function works", "Section"], Cell[TextData[{ "Suppose we have a region defined by the two curves y = 4 - ", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "for ", Cell[BoxData[ \(TraditionalForm\`\(-\@3\)\)]], "< x < ", Cell[BoxData[ \(TraditionalForm\`\@3\)]], " and y = ", Cell[BoxData[ \(TraditionalForm\`\@\(2\ - \ x\^2\)\)]], "for ", Cell[BoxData[ \(TraditionalForm\`\(-\@2\)\)]], "< x < ", Cell[BoxData[ \(TraditionalForm\`\@2\)]], "and the straight lines joining the ends of the curves. (See Figure 1.)" }], "Text"], Cell[BoxData[ \(FilledPlot[{botfn[x], 4\ - \ x\^2}, {x, \(-\@3\), \@3}, PlotRange\ \[Rule] \ {{\(-2\), 2.3}, {0, 4}}, AspectRatio\ \[Rule] \ Automatic, Epilog\ \[Rule] \ {Text[\*"\"\\"", \ { .64, .45}], Text[\*"\"\\"", {1.4, 3.5}]}, PlotLabel\ \[Rule] \ "\
", Ticks\ \[Rule] \ {Automatic, {1, 2, 3, 4}}, ImageSize\ \[Rule] \ 280]\)], "Input", CellOpen->False, InitializationCell->True], Cell["\<\ We proceed as follows. First we divide the x-range both curves into \ 20 equal parts. The divisions will be of different size for the two curves. \ Next we mark off the points on the curves determined by these subdivisions \ and join corresponding points on the two curves with straight lines. Next we \ divide the length of each of the straight lines into ten equal units. This \ creates a grid which is shown in Figure 2. Then all we need do to create a 3D \ plot of a surface over this region is to assign a third coordinate to each of \ the grid points. This is what RegionPlot3D does.\ \>", "Text"], Cell[BoxData[ \(Show[ Graphics[{{Hue[ .95], Line /@ Take[crvtbl, {2, 11}], AbsoluteThickness[2], Line /@ {First[crvtbl], Last[crvtbl]}}, {Hue[ .7], Line /@ lntbl}}], AspectRatio\ \[Rule] \ Automatic, Axes\ \[Rule] \ True, PlotLabel\ \[Rule] \ "\
", Epilog\ \[Rule] \ {Text[\*"\"\\"", \ { .6, .7}], Text[\*"\"\\"", {1.25, 3.5}]}, ImageSize\ \[Rule] 260]\)], "Input", CellOpen->False, InitializationCell->True], Cell[CellGroupData[{ Cell["An example", "Subsection"], Cell[TextData[{ "Here is an example plotting the function z = ", Cell[BoxData[ \(y/3. \ - x\^2/5. \)]], " over the above region." }], "Text"], Cell[BoxData[ \(RegionPlot3D[{fn_, {var1_, var2_}}, {f1_, {var_, varmin1_, varmax1_}}, {f2_, {var_, varmin2_, varmax2_}}, opts___] := Module[{scalefactor1, scalefactor2, myvar1, myvar2, tt, ffn, ff1, ff2, rr, pltopts, styleopts, t, r}, \[IndentingNewLine]pltopts\ = \ Select[{opts}, #[\([1]\)] =!= SurfaceStyle &]; \[IndentingNewLine]styleopts\ = \ \ \(SurfaceStyle /. {opts}\) /. SurfaceStyle\ \[Rule] \ {}; \[IndentingNewLine]ffn[tt_, rr_] = If[Head[fn] === Symbol && \(! MemberQ[{var1, var2, var}, fn]\), fn[tt, rr], fn /. {var1 \[Rule] tt, var2 \[Rule] \ rr}]; \[IndentingNewLine]ff1[tt_] = If[Head[f1] === Symbol && \(! MemberQ[{var1, var2, var}, fn1]\), f1[tt], f1 /. var \[Rule] tt]; \[IndentingNewLine]ff2[tt_] = If[Head[f2] === Symbol && \(! MemberQ[{var1, var2, var}, fn2]\), f2[tt], f2 /. var \[Rule] tt]; \[IndentingNewLine]Which[ var === var1, \[IndentingNewLine]scalefactor1[ r_]\ = \ \((varmax1 - varmin1)\) r\ + varmin1; \[IndentingNewLine]scalefactor2[ r_]\ = \ \((varmax2 - varmin2)\)\ r\ + \ varmin2; \[IndentingNewLine]myvar1[t_, r_]\ = \ Simplify[\((1 - t)\) scalefactor1[r]\ + t\ scalefactor2[r]]; \[IndentingNewLine]myvar2[t_, r_]\ = \ Simplify[\((1 - t)\)\ ff1[scalefactor1[r]]\ + \ t\ ff2[scalefactor2[r]]]; \[IndentingNewLine]ff2n[tt_, rr_] = Simplify[ ffn[myvar1[tt, rr], myvar2[tt, rr]]]; \[IndentingNewLine]pltfn[ t_, r_] = {myvar1[t, r], myvar2[t, r], ff2n[t, r], styleopts}, \[IndentingNewLine]var\ === \ var2, \[IndentingNewLine]scalefactor1[ r_]\ = \ \((varmax1 - varmin1)\) r\ + varmin1; \[IndentingNewLine]scalefactor2[ r_]\ = \ \((varmax2 - varmin2)\)\ r\ + \ varmin2; \[IndentingNewLine]myvar2[t_, r_]\ = \ Simplify[\((1 - t)\) scalefactor1[r]\ + t\ scalefactor2[r]]; \[IndentingNewLine]myvar1[t_, r_]\ = \ Simplify[\((1\ - \ t)\)\ ff1[scalefactor1[r]]\ + \ t\ ff2[scalefactor2[r]]]; \[IndentingNewLine]ff2n[tt_, rr_] = Simplify[ ffn[myvar1[tt, rr], myvar2[tt, rr]]]; \[IndentingNewLine]pltfn[ t_, r_] = {myvar1[t, r], myvar2[t, r], ff2n[t, r], styleopts}, \[IndentingNewLine]True, \ \[IndentingNewLine]scalefactor1[t_]\ = \ \((varmax1 - varmin1)\) t\ + varmin1; \[IndentingNewLine]scalefactor2[ t_]\ = \ \((varmax2 - varmin2)\)\ t\ + \ varmin2; \[IndentingNewLine]basecoords[r_, t_]\ = \ Simplify[\((1 - r)\)\ ff1[scalefactor1[t]] + \ r\ ff2[scalefactor2[t]]]; \[IndentingNewLine]pltfn[r_, t_]\ = \ Flatten[{basecoords[r, t], Simplify[Apply[ffn, basecoords[r, t]]], styleopts}]\[IndentingNewLine]]; \ \[IndentingNewLine]ParametricPlot3D[ Chop[Evaluate[pltfn[r, t]], 10^\(-7\)], {t, 0, 1}, {r, 0, 1}, Evaluate[pltopts], Compiled\ \[Rule] \ False]\[IndentingNewLine]]\)], "Input", InitializationCell->True], Cell[BoxData[ \(RegionPlot3D[{y/3. \ - x\^2/5. , {x, y}}, {\@\(2. \ - \ x\^2\), {x, \(-\@2\), \@2}}, {4\ - \ x\^2, {x, \(-\@3\), \@3}}, ImageSize \[Rule] 260, PlotPoints\ \[Rule] \ {15, 45}]\)], "Input", InitializationCell->True] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Using the function", "Section"], Cell[CellGroupData[{ Cell["Boundaries of the form y = f(x)", "Subsection"], Cell[TextData[{ "The input for this function follows the basic form for all ", StyleBox["Mathematica", FontSlant->"Italic"], " plot functions. It is always possible to combine several plots and so we \ need only work with three types of regions. These are illustrated in the \ Figure 3. The function will not work correctly if any of the interior angles \ are greater than \[Pi] radians (180 degrees)." }], "Text"], Cell[BoxData[ \(Show[ GraphicsArray[{{plot1, plot2}, {plot3}}, Frame\ \[Rule] \ True, PlotLabel\ \[Rule] \ StyleForm["\< Figure 2\nPossible plot regions\>", \ "\"]], ImageSize\ \[Rule] \ 520, DisplayFunction\ \[Rule] \ $DisplayFunction]\)], "Input", CellOpen->False, InitializationCell->True], Cell[CellGroupData[{ Cell["Arguments for RegionPlot3D", "Subsubsection"], Cell[BoxData[""], "Input"], Cell["\<\ The arguments for RegionPlot3D for this type of region are (the \ variable specification in the second and third arguments must be the \ same.):\ \>", "Text"], Cell[BoxData[ StyleBox[\(RegionPlot3D[{surface\ function, {var1, var2}}, {boundary\ function\ 1, {var, varmin1, varmax1}}, {boundary\ function2, {var, varmin2, varmax2}}, options]\), CellFrame->True, Background->GrayLevel[0.849989]]], "Input", CellFrame->True, Evaluatable->False, Background->GrayLevel[0.849989]] }, Open ]], Cell[CellGroupData[{ Cell["Case one", "Subsubsection"], Cell[TextData[{ "The three region examples given above all share the property that the \ boundaries can be written as functions of x. We start with the first case by \ finding the intersection of the two curves. You can often do this by \ inspection but you can also do it using ", StyleBox["Mathematica", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[ \(sol1\ = \ Solve[4\ - \ x\^2 \[Equal] \ 1, x]\)], "Input"], Cell[BoxData[ \(pts\ = \ Map[x /. # &, sol1]\)], "Input"], Cell["\<\ We use Flatten on the second and third arguments to get them in the \ proper form.\ \>", "Text"], Cell[BoxData[ \(RegionPlot3D[{\ y/2, {x, y}}, {4. - x\^2, Flatten[{x, pts}]}, {1. , Flatten[{x, pts}]}]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Case Two", "Subsubsection"], Cell["\<\ Here we take one of the curves to be a point. Everything else is \ handled in the same way as in the first example.\ \>", "Text"], Cell[BoxData[ \(RegionPlot3D[{y, {x, y}}, {0, {x, 0, 0}}, {4. - x\^2, Flatten[{x, pts}]}]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Case Three", "Subsubsection"], Cell["\<\ Here things are handled as in the first case except the end points \ are different for each of the boundaries. Since the boundary curves are given \ as functions of x we give the points in ascending order of \ x-coordinates.\ \>", "Text"], Cell[BoxData[ \(RegionPlot3D[{y/3. \ - x\^2/5. , {x, y}}, {\@\(2. \ - \ x\^2\), {x, \(-\@2\), \@2}}, {4\ - \ x\^2, {x, \(-\@3\), \@3}}, ImageSize \[Rule] 260, PlotPoints\ \[Rule] \ {15, 15}]\)], "Input"], Cell["\<\ In this case we can also use the case one situation by using Which \ to define the lower boundary of the region. Notice how the surface mesh \ changes when we do this.\ \>", "Text"], Cell[BoxData[ RowBox[{\(botfn[x_]\), " ", ":=", " ", RowBox[{"Which", "[", RowBox[{\(x \[LessEqual] \ \(-\@2. \)\), ",", \(x/\((\@2. - \@3. )\) + \ \@2. /\((\@2. - \@3. )\)\), ",", \(\(-\@2. \) < x < \@2. \), ",", \(\@\(2. - x\^2\)\), ",", "True", ",", RowBox[{\(\(-x\)/\((\@2. - \@3. )\)\), "+", " ", RowBox[{\(\@2. /\((\@2. - \@3. )\)\), Cell[""]}]}]}], "]"}]}]], "Input"], Cell[BoxData[ \(RegionPlot3D[{y/3. \ - x\^2/5. , {x, y}}, {botfn[ x], {x, \(-\@3\), \@3}}, {4\ - \ x\^2, {x, \(-\@3\), \@3}}, ImageSize \[Rule] 260, PlotPoints\ \[Rule] \ 15]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Options", "Subsubsection"], Cell["\<\ RegionPlot3D will take all of the standard Options of \ ParametricPlot3D. It also takes a new Option SurfaceStyle. SurfaceStyle takes \ any value which is a valid argument for the fourth coordinate in \ ParametricPlot3D. Thus to eliminate the \"grid\" on our surface we could use \ SurfaceStyle -> EdgeForm[]. We can also modify the color of the surface by \ adding color directives. SurfaceColor -> \ {SurfaceColor[RGBColor[.45,.45,0],RGBColor[.2,.2,.4],10],EdgeForm[]}.\ \>", \ "Text"], Cell[BoxData[ \(plot1\ = RegionPlot3D[{y/3. \ - x\^2/5. , {x, y}}, {\@\(2. \ - \ x\^2\), {x, \(-\@2\), \@2}}, {4\ - \ x\^2, {x, \(-\@3\), \@3}}, ImageSize \[Rule] 260, PlotPoints\ \[Rule] \ {15, 45}, SurfaceStyle\ \[Rule] \ {SurfaceColor[RGBColor[ .45, .45, 0], RGBColor[ .2, .2, .4], 10], EdgeForm[]}, ViewPoint -> {\(-2.606\), \ \(-1.381\), \ 1.659}, LightSources \[Rule] {{{1.`, 0.`, 1.`}, RGBColor[1.`, 1. , 1. ]}, {{1.`, 1.`, 1.`}, RGBColor[1. , 1. , 1.`]}, {{0.`, \(-1.`\), 1.`}, RGBColor[1. , 1.`, 1.`]}}]\)], "Input"], Cell["\<\ RegionPlot3D also works in conjunction with other Graphic functions \ such as shadow.\ \>", "Text"], Cell[BoxData[ \(Shadow[plot1, XShadow\ \[Rule] \ False, YShadow\ \[Rule] \ False, ViewPoint -> {\(-2.606\), \ \(-1.381\), \ 1.659}, ZShadowPosition\ \[Rule] \ \(-7\)/4, Boxed\ \[Rule] \ False, Axes\ \[Rule] \ True, LightSources \[Rule] {{{1.`, 0.`, 1.`}, RGBColor[1.`, 1. , 1. ]}, {{1.`, 1.`, 1.`}, RGBColor[1. , 1. , 1.`]}, {{0.`, \(-1.`\), 1.`}, RGBColor[1. , 1.`, 1.`]}}]\)], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Boundaries of the form x = g(y)", "Subsection"], Cell[CellGroupData[{ Cell["Alternate Arguments for RegionPlot3D", "Subsubsection"], Cell["\<\ In some cases it is easier to express the boundaries of the region \ as a function of y. RegionPlot3D accepts this configuration and automatically \ orients the plot correctly. Here is an example creating a section of a \ punctured sphere.\ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Quarter sphere", "Subsubsection"], Cell[BoxData[ \(ff1[y_] := \@\(1 - y\^2\)\)], "Input"], Cell[BoxData[ \(ff2[y_]\ := \ \@\(4\ - \ y\^2\)\)], "Input"], Cell[BoxData[ \(ff4[x_, y_]\ := \@\(4 - \((x\^2\ + \ y\^2)\)\)\)], "Input"], Cell[BoxData[ \(plot2\ = RegionPlot3D[{ff4, {x, y}}, {ff1, {y, \(-1\), 1}}, {ff2, {y, \(-2\), 2}}, PlotPoints\ \[Rule] \ {30, 35}, ViewPoint -> {\(-1.812\), \ 2.548, \ 1.294}, SurfaceStyle\ \[Rule] \ EdgeForm[], AxesLabel\ \[Rule] \ {"\", "\", "\<\>"}]\)], \ "Input"], Cell["\<\ We can get the other half of the above sphere by defining a second \ set of boundary functions.\ \>", "Text"], Cell[BoxData[ \(ff1N[y_] := \(-\@\(1 - y\^2\)\)\)], "Input"], Cell[BoxData[ \(ff2N[y_]\ := \ \(-\@\(4\ - \ y\^2\)\)\)], "Input"], Cell[BoxData[ \(plot3\ = RegionPlot3D[{ff4, {x, y}}, {ff1N, {y, \(-1\), 1}}, {ff2N, {y, \(-2\), 2}}, PlotPoints\ \[Rule] \ {30, 35}, ViewPoint -> {\(-1.812\), \ 2.548, \ 1.294}, SurfaceStyle\ \[Rule] \ EdgeForm[], AxesLabel\ \[Rule] \ {"\", "\", "\<\>"}]\)], \ "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Combining plots", "Subsubsection"], Cell["And here we put them together.", "Text"], Cell[BoxData[ \(Show[{plot2, plot3}]\)], "Input"], Cell["\<\ By including a cylinder of appropriate size we can make the sphere \ appear to be solid. We use the following to determine the height of the \ cylinder.\ \>", "Text"], Cell[BoxData[ \(ff4[1, 0]\)], "Input"], Cell[BoxData[ \(plot4\ = \ ParametricPlot3D[{Cos[t], Sin[t], z, EdgeForm[]}, {t, 0, 2\ \[Pi]}, {z, 0, \@3}, PlotPoints\ \[Rule] \ {36, 4}, DisplayFunction\ \[Rule] \ Identity]\)], "Input"], Cell[BoxData[ \(Show[{plot2, plot3, plot4}, Boxed\ \[Rule] \ False]\)], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Boundaries in polar coordinates", "Subsection"], Cell["The arguments for RegionPlot3D for this type of region are :", "Text"], Cell[BoxData[ StyleBox[\(RegionPlot3D[{surface\ function, {var1, var2}}, {{x1[var], y1[var]}, {var, varmin1, varmax1}}, {{x2[var], y2[var]}, {var, varmin2, varmax2}}, options]\), CellFrame->True, Background->GrayLevel[0.849989]]], "Input", CellFrame->True, Evaluatable->False, Background->GrayLevel[0.849989]], Cell["\<\ In the above example of the sphere it would be easier to give the \ boudary curves in polar coordinates. RegionPlot3D will also accomodate this \ case, but the form of the arguments changes slightly. The boundary functions \ must be given as ordered pairs of functions and the variable name cannot be \ either one of the variables given in the first argument. The first function \ used to define the surface should still be given in cartesian \ coordinates.\ \>", "Text"], Cell[BoxData[ \(plot5\ = \ RegionPlot3D[{ff4, {x, y}}, {{Cos[t], Sin[t]}, {t, 0, 2\ \[Pi]}}, {{2\ Cos[t], 2\ Sin[t]}, {t, 0, 2\ \[Pi]}}, PlotPoints\ \[Rule] \ {30, 35}, ViewPoint -> {\(-1.812\), \ 2.548, \ 1.294}, SurfaceStyle\ \[Rule] \ EdgeForm[], AxesLabel\ \[Rule] \ {"\", "\", "\<\>"}]\)], \ "Input"], Cell[BoxData[ \(Show[{plot4, plot5}, DisplayFunction\ \[Rule] \ $DisplayFunction]\)], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Limitations of the function", "Section"], Cell[TextData[{ "There are some limitations of the function due to the accumulation of \ numerical error. First the independent variable used to define the boundaries \ is scaled. The scaled variable is then fed to boundary functions. Both of \ these functions are then used as arguments in the surface function leading to \ the following composition of functions:\n\n\t{scalefunc[x], \ boundaryfunc[scalefunc[x]], \ surfacefunc[scalefunc[x],boundaryfunc[scalefunc[x]]]}\n\t\t\t\nSince all of \ the plot functions in ", StyleBox["Mathematica", FontSlant->"Italic"], " automatically use machine precision numbers it is inevitable that with \ some boundary functions small imaginary parts are going to arise. I have \ attempted to account for this by setting the critical value for Chop to ", Cell[BoxData[ \(TraditionalForm\`10\^\(-7\)\)]], "which works in most cases. This may, however, lead to problems with small \ regions where more decimal places are needed to define the boundaries of the \ region causing necessary values to be discarded." }], "Text"] }, Closed]] }, Closed]] }, FrontEndVersion->"4.1 for Macintosh", ScreenRectangle->{{0, 1024}, {0, 746}}, AutoGeneratedPackage->None, ScreenStyleEnvironment->"Presentation", WindowSize->{795, 661}, WindowMargins->{{26, Automatic}, {Automatic, 18}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 54, 0, 148, "Title"], Cell[CellGroupData[{ Cell[1806, 56, 33, 0, 72, "Section"], Cell[1842, 58, 73, 2, 27, "Input", InitializationCell->True], Cell[1918, 62, 533, 10, 106, "Input", InitializationCell->True], Cell[2454, 74, 629, 11, 129, "Input", InitializationCell->True], Cell[3086, 87, 458, 10, 59, "Input", InitializationCell->True], Cell[3547, 99, 586, 11, 112, "Input", InitializationCell->True], Cell[4136, 112, 227, 4, 43, "Input", InitializationCell->True], Cell[4366, 118, 380, 8, 48, "Input", InitializationCell->True], Cell[4749, 128, 185, 4, 31, "Input", InitializationCell->True], Cell[4937, 134, 184, 4, 31, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[5158, 143, 30, 0, 44, "Section"], Cell[5191, 145, 330, 6, 86, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[5558, 156, 41, 0, 72, "Section"], Cell[5602, 158, 554, 20, 69, "Text"], Cell[6159, 180, 509, 10, 23, "Input", CellOpen->False, InitializationCell->True], Cell[6671, 192, 613, 9, 130, "Text"], Cell[7287, 203, 554, 11, 23, "Input", CellOpen->False, InitializationCell->True], Cell[CellGroupData[{ Cell[7866, 218, 32, 0, 65, "Subsection"], Cell[7901, 220, 154, 5, 42, "Text"], Cell[8058, 227, 3389, 57, 996, "Input", InitializationCell->True], Cell[11450, 286, 268, 5, 83, "Input", InitializationCell->True] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[11767, 297, 37, 0, 44, "Section"], Cell[CellGroupData[{ Cell[11829, 301, 53, 0, 65, "Subsection"], Cell[11885, 303, 424, 8, 86, "Text"], Cell[12312, 313, 358, 8, 23, "Input", CellOpen->False, InitializationCell->True], Cell[CellGroupData[{ Cell[12695, 325, 51, 0, 58, "Subsubsection"], Cell[12749, 327, 26, 0, 36, "Input"], Cell[12778, 329, 168, 4, 64, "Text"], Cell[12949, 335, 370, 9, 92, "Input", Evaluatable->False] }, Open ]], Cell[CellGroupData[{ Cell[13356, 349, 33, 0, 58, "Subsubsection"], Cell[13392, 351, 353, 8, 86, "Text"], Cell[13748, 361, 79, 1, 39, "Input"], Cell[13830, 364, 62, 1, 36, "Input"], Cell[13895, 367, 106, 3, 42, "Text"], Cell[14004, 372, 130, 2, 59, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[14171, 379, 33, 0, 58, "Subsubsection"], Cell[14207, 381, 139, 3, 42, "Text"], Cell[14349, 386, 116, 2, 59, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[14502, 393, 35, 0, 58, "Subsubsection"], Cell[14540, 395, 248, 5, 64, "Text"], Cell[14791, 402, 240, 4, 83, "Input"], Cell[15034, 408, 191, 4, 64, "Text"], Cell[15228, 414, 465, 9, 121, "Input"], Cell[15696, 425, 211, 3, 77, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[15944, 433, 32, 0, 58, "Subsubsection"], Cell[15979, 435, 498, 9, 130, "Text"], Cell[16480, 446, 667, 12, 227, "Input"], Cell[17150, 460, 109, 3, 42, "Text"], Cell[17262, 465, 463, 8, 136, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[17774, 479, 54, 0, 37, "Subsection"], Cell[CellGroupData[{ Cell[17853, 483, 61, 0, 58, "Subsubsection"], Cell[17917, 485, 263, 5, 86, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[18217, 495, 39, 0, 58, "Subsubsection"], Cell[18259, 497, 58, 1, 50, "Input"], Cell[18320, 500, 66, 1, 50, "Input"], Cell[18389, 503, 81, 1, 50, "Input"], Cell[18473, 506, 340, 7, 96, "Input"], Cell[18816, 515, 119, 3, 42, "Text"], Cell[18938, 520, 64, 1, 50, "Input"], Cell[19005, 523, 72, 1, 50, "Input"], Cell[19080, 526, 342, 7, 96, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[19459, 538, 40, 0, 58, "Subsubsection"], Cell[19502, 540, 46, 0, 42, "Text"], Cell[19551, 542, 53, 1, 36, "Input"], Cell[19607, 545, 176, 4, 64, "Text"], Cell[19786, 551, 42, 1, 36, "Input"], Cell[19831, 554, 222, 4, 99, "Input"], Cell[20056, 560, 85, 1, 36, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[20190, 567, 53, 0, 37, "Subsection"], Cell[20246, 569, 76, 0, 42, "Text"], Cell[20325, 571, 357, 8, 92, "Input", Evaluatable->False], Cell[20685, 581, 481, 8, 108, "Text"], Cell[21169, 591, 387, 8, 96, "Input"], Cell[21559, 601, 106, 2, 36, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[21714, 609, 46, 0, 44, "Section"], Cell[21763, 611, 1077, 19, 262, "Text"] }, Closed]] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)