(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of 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[ 8466, 304]*) (*NotebookOutlinePosition[ 9358, 335]*) (* CellTagsIndexPosition[ 9314, 331]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[{ StyleBox["Your Assignment:", CellFrame->True, Evaluatable->False, InitializationCell->True, AspectRatioFixed->True, Background->GrayLevel[0.899992]], StyleBox[ "\n1) Execute the entire notebook. Experiment if you like. \n2) Generate a \ plot for the set of 3 charges described at the end.\n3) Hand in the plot.", CellFrame->True, Evaluatable->False, InitializationCell->True, AspectRatioFixed->True, FontSize->14, Background->GrayLevel[0.899992]] }], "Section", CellFrame->True, Evaluatable->False, InitializationCell->True, AspectRatioFixed->True, Background->GrayLevel[0.899992]], Cell[TextData[ " Suggestion: if you want to save this file on you disk, CUT the graphics \ first so it will fit. (Graphics take up over 1MB.)"], "Subsubsection", CellFrame->True, Evaluatable->False, AspectRatioFixed->True, Background->GrayLevel[0.899992]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["**********************************\nInitialization Stuff:", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True], StyleBox["\n(Just execute this, don't read it!!!)", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True, FontSize->14] }], "Section", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True], Cell["\<\ Needs[\"Graphics`PlotField`\"]; Needs[\"Graphics`PlotField3D`\"];\ \>", "Input", InitializationCell->True, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Don't mind any ", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True], StyleBox[" Warning:... ", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Plain", FontColor->RGBColor[1, 0, 0]], StyleBox["ind an messages here!", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True] }], "Subsubsection", Evaluatable->False, InitializationCell->True, AspectRatioFixed->True], Cell["\<\ Clear[\"Global`*\"]; Unprotect[{go2d,go3d,Monopole}]; Monopole[q_,v0_:{0,0,0},v_:{x,y,z}]:= q/(Sqrt[(v0-v).(v0-v)])\ \>", "Input", InitializationCell->True, AspectRatioFixed->True], Cell["\<\ go2d[distribution_]:= PlotGradientField[-distribution/.{z->0} //Evaluate ,{x,-2,2.01},{y,-2,2.01} ,ScaleFunction->(1&)];\ \>", "Input", InitializationCell->True, AspectRatioFixed->True], Cell["\<\ go3d[distribution_]:= PlotGradientField3D[-distribution //Evaluate ,{x,-2,2.01},{y,-2,2.01},{z,-2,2.01} ,PlotPoints->8 ,ScaleFunction->(1&) ,VectorHeads->True];\ \>", "Input", InitializationCell->True, AspectRatioFixed->True], Cell["\<\ Protect[{go2d,go3d,Monopole}]; Off[Clear::wrsym];\ \>", "Input", InitializationCell->True, AspectRatioFixed->True] }, Closed]], Cell["\<\ ********************************** Electric Fields Due to Point Charges:\ \>", "Section", CellFrame->True, Evaluatable->False, AspectRatioFixed->True, Background->GrayLevel[0.899992]], Cell["Clear[\"Global`*\"];", "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox[ " The Monopole[q,{x,y,z}] function places a single charge q \n at position \ {x,y,z}. An example would be: ", Evaluatable->False, AspectRatioFixed->True], StyleBox[" Monopole[+1,{1,0,0}]\n", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ "Let's look at the field due to a single charge located at the origin, \ {x,y,z}={0,0,0}. \n\nThe function ", Evaluatable->False, AspectRatioFixed->True], StyleBox["go2d", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[ " automatically plots the electric field vector in the {x,y} plane. \n(This \ automatically plots the region from {-2,2}.)", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["go2d[ Monopole[+1,{0,0,0}] ];", "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["We can create a dipole from two ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Monopole", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" functions:\n(Notice that the signs are opposite)", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["dipole= Monopole[+1,{1,0,0}]+Monopole[-1,{-1,0,0}]", "Input", AspectRatioFixed->True], Cell[TextData["Now let's look at the E field."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["go2d[ dipole ];", "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["In a similar fashion, ", Evaluatable->False, AspectRatioFixed->True], StyleBox["go3d", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier", FontWeight->"Bold"], StyleBox[" makes a plot of the E field in 3-dimensions. Try it! ", Evaluatable->False, AspectRatioFixed->True], StyleBox["(3D plots will take some time.)", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox["", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["thisPlot= go3d[ dipole ];", "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "This may look neater from a different viewpoint. \n(Note how I defined \ thisPlot so I would not have to re-compute the above plot. This saves time.)\n\ ", Evaluatable->False, AspectRatioFixed->True], StyleBox["(3D plots will take some time.)", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold"], StyleBox["", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold", FontSlant->"Italic"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["Show[thisPlot,ViewPoint->{0.000, 0.000, 4.000}];", "Input", AspectRatioFixed->True], Cell[TextData[ "Now you get the idea. Instead of a dipole, let's try two charges of the same \ sign. "], "Text", Evaluatable->False, AspectRatioFixed->True], Cell["twoCharges= Monopole[+1,{1,0,0}]+Monopole[+1,{-1,0,0}]", "Input", AspectRatioFixed->True], Cell["go2d[ twoCharges ];", "Input", AspectRatioFixed->True], Cell[TextData[ "Now that you are started, you can experiment with different charge \ configurations. Try three charges located at {1,0,0}, {-1,0,0}, {0,1,0}. Go \ and experiment. "], "Subsection", CellFrame->True, Evaluatable->False, AspectRatioFixed->True, Background->GrayLevel[0.899992]] }, FrontEndVersion->"Microsoft Windows 3.0", ScreenRectangle->{{0, 1152}, {0, 808}}, AutoGeneratedPackage->None, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{432, 636}, WindowMargins->{{29, Automatic}, {Automatic, 15}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False} ] (*********************************************************************** 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[1709, 49, 658, 21, 141, "Section", Evaluatable->False, InitializationCell->True], Cell[2370, 72, 263, 6, 76, "Subsubsection", Evaluatable->False], Cell[CellGroupData[{ Cell[2658, 82, 415, 13, 92, "Section", Evaluatable->False, InitializationCell->True], Cell[3076, 97, 144, 5, 48, "Input", InitializationCell->True], Cell[3223, 104, 541, 19, 43, "Subsubsection", Evaluatable->False, InitializationCell->True], Cell[3767, 125, 195, 7, 102, "Input", InitializationCell->True], Cell[3965, 134, 209, 7, 102, "Input", InitializationCell->True], Cell[4177, 143, 258, 9, 120, "Input", InitializationCell->True], Cell[4438, 154, 128, 5, 48, "Input", InitializationCell->True] }, Closed]], Cell[4581, 162, 201, 7, 70, "Section", Evaluatable->False], Cell[4785, 171, 63, 1, 30, "Input"], Cell[4851, 174, 887, 28, 130, "Text", Evaluatable->False], Cell[5741, 204, 72, 1, 30, "Input"], Cell[5816, 207, 418, 14, 53, "Text", Evaluatable->False], Cell[6237, 223, 93, 1, 30, "Input"], Cell[6333, 226, 104, 2, 33, "Text", Evaluatable->False], Cell[6440, 230, 58, 1, 30, "Input"], Cell[6501, 233, 625, 22, 53, "Text", Evaluatable->False], Cell[7129, 257, 68, 1, 30, "Input"], Cell[7200, 260, 538, 18, 90, "Text", Evaluatable->False], Cell[7741, 280, 91, 1, 30, "Input"], Cell[7835, 283, 160, 4, 33, "Text", Evaluatable->False], Cell[7998, 289, 97, 1, 30, "Input"], Cell[8098, 292, 62, 1, 30, "Input"], Cell[8163, 295, 299, 7, 101, "Subsection", Evaluatable->False] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)