(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' 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[ 3719, 107]*) (*NotebookOutlinePosition[ 4391, 130]*) (* CellTagsIndexPosition[ 4347, 126]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Exploring The Mandelbrot Set", "Title"], Cell["\<\ The functions drawMB[xr, yr] drawMBwithBox[xr, yr, xrb, yrb] plot part of the Mandelbrot set where xr specifies the inteval on the x-axis \ and yr specifies the interval on the y-axis. To create sequences of pictures \ where each gives a zoomed-in view of part of the previous image, use \ drawMBwithBox[xr, yr, xrb, yrb] to draw the current view with a box placed to \ show the region to be drawn at the next step. Here xrb and yrb specify \ intervals on the x and y axes defining the box. See the examples below. \ \>", "Text"], Cell["Off[General::spell1];", "Input", CellOpen->False, InitializationCell->True], Cell["\<\ f[x_, y_, max_] := ( z = c = x + I*y; i = 0; While[ Abs[z] < 2.0 && i < max, \ z = z*z + c; i++ ]; Return[i]; ) box[xr_,yr_]:= \ Line[{{xr[[1]],yr[[1]]},{xr[[2]],yr[[1]]},{xr[[2]],yr[[2]]},{xr[[1]],yr[[2]]},\ {xr[[1]],yr[[1]]}}]; drawMB[xr_,yr_,shw_:True]:= DensityPlot[ f[x, y, 60], Evaluate[Flatten[{x, \ xr}]], Evaluate[Flatten[{y, yr}]], PlotPoints -> 300, Mesh -> False, \ ColorFunction -> Hue, Evaluate[If[shw == \ True,DisplayFunction->$DisplayFunction,DisplayFunction->Identity]]]; drawMBwithBox[xr_,yr_,xrb_,yrb_]:= Show[drawMB[xr,yr,False], \ Graphics[box[xrb,yrb]], DisplayFunction->$DisplayFunction]\ \>", "Input", InitializationCell->True, FontFamily->"Courier New"], Cell["drawMB[{-2.25,.75},{-1.5,1.5}];", "Input"], Cell["drawMBwithBox[{-2.25,.75},{-1.5,1.5},{-.3,.1},{-1.2,-.7}];", "Input"], Cell["drawMB[{-.3,.1},{-1.2,-.7}];", "Input"], Cell["\<\ drawMBwithBox[{-.3,.1},{-1.2,-.7},{-.18,-.14},{-1.06,-1.01}];\ \>", "Input"], Cell["drawMB[{-.18,-.14},{-1.06,-1.01}];", "Input"], Cell["\<\ drawMBwithBox[{-.18,-.14},{-1.06,-1.01},{-.152,-.15},{-1.045,-1.042}];\ \>", "Input"], Cell["drawMB[{-.152,-.15},{-1.045,-1.042}];", "Input"] }, Open ]] }, FrontEndVersion->"5.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, AutoGeneratedPackage->None, WindowSize->{1016, 651}, WindowMargins->{{0, Automatic}, {Automatic, 0}} ] (******************************************************************* 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[1776, 53, 45, 0, 95, "Title"], Cell[1824, 55, 620, 11, 147, "Text"], Cell[2447, 68, 85, 2, 19, "Input", CellOpen->False, InitializationCell->True], Cell[2535, 72, 693, 14, 102, "Input", InitializationCell->True], Cell[3231, 88, 48, 0, 30, "Input"], Cell[3282, 90, 75, 0, 30, "Input"], Cell[3360, 92, 45, 0, 30, "Input"], Cell[3408, 94, 86, 2, 30, "Input"], Cell[3497, 98, 51, 0, 30, "Input"], Cell[3551, 100, 95, 2, 30, "Input"], Cell[3649, 104, 54, 0, 30, "Input"] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)