(************** 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[ 24669, 915]*) (*NotebookOutlinePosition[ 40630, 1321]*) (* CellTagsIndexPosition[ 39087, 1261]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell[TextData[{ "Introduction to Programming \nwith \n", StyleBox["Mathematica", FontSlant->"Italic"] }], "Title", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ By Richard J. Gaylord (gaylord@ux1.cso.uiuc.edu) Samuel N. Kamin (kamin@cs.uiuc.edu) Paul R. Wellin (wellin@sonoma.edu)\ \>", "Subsubtitle", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Copyright \[Copyright] 1993 by TELOS/Springer-Verlag\ \>", "Subsubtitle", ImageRegion->{{0, 1}, {0, 1}}, FontSlant->"Plain"], Cell[CellGroupData[{Cell["\<\ Chapter 10 \[Dash] Graphics Programming\ \>", "Subtitle", ImageRegion->{{0, 1}, {0, 1}}], Cell["(Mathematica code)", "Subsubtitle", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Functions defined in this Notebook...(page no. in book)", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ line1...221 line2...222 point1...221 point2...222 hline...223 vline...223 text1...224 text2...224 text3...224 text4...226 arc...226 randomWalk3D...227 showRandomWalk3D...227,232 eqn1... eqn2... solns... rsolns... r1...230 r2...230 c...230 c1...230 c2...230 dashc1...231 dashc2...231 colorWheel...232 coords...243 points...243 lines...244 path...245 base...245 angle...245 remain...245 simpleClosePath...246 SimpleClosedPath... figtree5...250 figtree6...251 figtree7...253 figtree8...253 figtree9...253 digits...257 irratdigits...257 fmSynthesis...258 cmajor...259 notes4...260 tones...260 randomnotes...261 notes...261 somenotes...263 tonesAndTimes...263 step...263 s20...263 pos...263 brown...4 cmajor16...264 fractal...264\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Initialization (evaluate to turn off spell messages)", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell["Off[General::spell]", "Input", InitializationCell->True, ImageRegion->{{0, 1}, {0, 1}}], Cell["Off[General::spell1]", "Input", InitializationCell->True, ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Section 10.1 Graphics Primitives", "Section", ImageRegion->{{0, 1}, {0, 1}}, CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}], Cell[CellGroupData[{Cell["Graphical representation of complex numbers", \ "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["z = 8 + 3I;", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["cz = Conjugate[z];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["line1 = Line[{{0, 0}, {Re[z], Im[z]}}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["line2 = Line[{{0, 0}, {Re[cz], Im[cz]}}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["point1 = {PointSize[.02], Point[{Re[z], Im[z]}]};", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["point2 = {PointSize[.02], Point[{Re[cz], Im[cz]}]};", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{line1, point1, line2, point2}, \tAxes->True]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ hline = {Dashing[{0.04, 0.04}], Line[{{0, Im[z]}, {Re[z], Im[z]}}]};\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ vline = {Dashing[{0.04, 0.04}], Line[{{Re[z], 0}, {Re[z], Im[z]}}]};\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{line1, point1, line2, point2, hline, vline}, Axes->True, Ticks->{{{Re[z], \"a\"}}, {{Im[z], \"b\"}}}, AxesLabel->{Re, Im}, AspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ text1 = Text[FontForm[\"z = a + b i\", {\"Times-Italic\", 9}], {Re[z] - .75, Im[z] + .35}];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ text2 = Text[FontForm[\"Abs[z]\", {\"Times-Italic\", 9}], {3.5, 2}];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ text3 = Text[FontForm[\"Conjugate[z] = a - b i\", {\"Times-Italic\", 9}], {Re[cz] - 1.4, Im[cz] - .35}];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{line1, line2, point1, point2, hline, vline, text1, text2, text3}, Axes->True, Ticks->{{{Re[z], \"a\"}}, {{Im[z], \"b\"}}}, AxesLabel->{Re, Im}, AspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["arc = Circle[{0, 0}, Abs[z]/3, {0, Arg[z]}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ text4 = Text[FontForm[\"Arg[z]\", {\"Times\", 9}], {3.5, .5}];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{line1, line2, point1, point2, hline, vline, text1, text2, text3, text4, arc}, Axes->True, Ticks->{{{Re[z], \"a\"}}, {{Im[z], \"b\"}}}, AxesLabel->{Re, Im}, AspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["3-Dimensional random walk", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ randomWalk3D[n_Integer]:= FoldList[Plus, {0, 0, 0}, Map[{Cos[#], Sin[#], #/N[Pi] - 1}&, Table[Random[Real, {0, N[2Pi]}], {n}]]]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ showRandomWalk3D[n_Integer]:= Show[Graphics3D[Line[randomWalk3D[n]]]]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ (* Example of 1000-step walk in space *) showRandomWalk3D[1000];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Section 10.2 Graphics Directives and Options", "Section", ImageRegion->{{0, 1}, {0, 1}}, CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}], Cell[CellGroupData[{Cell["Example of graphics directives", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["p1 = Point[{0, 0}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["p2 = Point[{1, 0}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["p3 = Point[{.5, .5}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Show[Graphics[{{PointSize[.025], p1, p2}, p3}]];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell[TextData[{ "Algebraic problem from Calculus&", StyleBox["Mathematica", FontSlant->"Italic"] }], "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Clear[eqn1,eqn2,solns,rsolns,r1,r2,c,c1,c2,dashc1,dashc2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ eqn1 = (x-1)^2 + (y-1)^2 == 2; eqn2 = (x+3)^2 + (y-4)^2 == r^2;\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["solns = Solve[{eqn1,eqn2},{x,y}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["solns[[1,1,2]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["rsolns = Solve[solns[[1,1,2]] == solns[[2,1,2]], r]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["r1 = rsolns[[2,1,2]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["r2 = rsolns[[4,1,2]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["c = Circle[{1, 1}, Sqrt[2]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ c1 = Circle[{-3, 4}, r1]; c2 = Circle[{-3, 4}, r2];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{c, c1, c2}, Axes->Automatic, AspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ dashc1 = {Dashing[{.025, .025}], Circle[{-3, 4}, r1]} dashc2 = {Dashing[{.05, .05}], Circle[{-3, 4}, r2]}\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{c, dashc1, dashc2}, Axes->Automatic, AspectRatio->Automatic]]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Exercises (color wheel)", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Clear[c,theta] colorWheel[theta_] := \tTable[{Hue[j/N[2Pi]], Disk[{0, 0}, 1, {j, j+theta}]}, \t{j, 0, 2Pi-theta, theta}]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[colorWheel[Pi/48]], (* Increase 48 for finer gradations *) \tAspectRatio->Automatic];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Section 10.3 Built-in Graphics Functions", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell["sampledata = Table[Random[], {50}, {50}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["ListDensityPlot[sampledata]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Plot[Sin[x], {x, 0, 2Pi}, PlotPoints->4, MaxBend->45, PlotDivision->1];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Plot[Cos[x], {x, 0, 2Pi (24)}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Plot3D[Sin[x y], {x, 0, 3Pi/2}, {y, 0, 3Pi/2}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Plot3D[Sin[x y], {x, 0, 2Pi}, {y, 0, 2Pi}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ (* Time and Memory Warning *) Plot3D[Sin[x y], {x, 0, 2Pi}, {y, 0, 2Pi}, \tPlotPoints->75];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Plot3D[1/(1 - ArcTan[x y]), {x, 0, 4}, {y, 0, 4}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ atanplot = \tPlot3D[1/(1 - ArcTan[x y]), {x, 0, 4}, {y, 0, 4}, \t\tPlotPoints->35];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Show[atanplot, ViewPoint->{2.8, 0, 2}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Show[atanplot, Axes->False, Boxed->False];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Section 10.4 Graphics Programming", "Section", ImageRegion->{{0, 1}, {0, 1}}, CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}], Cell[CellGroupData[{Cell["Simple closed paths", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Clear[coords,points,lines,path,base,angle,remain,s,p]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["coords = Table[{Random[], Random[]}, {10}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["points = Map[Point, coords]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Show[Graphics[{PointSize[.02], RGBColor[1,0,0], points}]];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["lines = Line[coords]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{PointSize[.02], RGBColor[1,0,0], \tpoints, lines}]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ path = Line[AppendTo[coords, First[coords]]]; Show[Graphics[{{PointSize[.02], RGBColor[1,0,0], \tpoints}, path}]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["base = coords[[Random[Integer, {1, Length[coords]}]]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["angle[a_List, b_List] := Apply[ArcTan, (b - a)] ", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["remain = DeleteCases[coords, base];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Map[angle[base, #]&, remain]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["s = Sort[remain, (angle[base, #1] <= angle[base, #2])&]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["p = Join[{base}, s, {base}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["path = Line[p];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[{{PointSize[.02], RGBColor[1,0,0], \tpoints}, path}]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["simpleClosedPath", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ simpleClosedPath[l_] := Module[{points, base, remain, angle, sorted, path}, points = {PointSize[.02], RGBColor[1, 0, 0], Map[Point, l]}; base = l[[ Random[Integer, {1, Length[l]}] ]]; remain = DeleteCases[l, base]; angle[a_, b_]:= Apply[ArcTan, (b - a)]; sorted = Sort[remain,(angle[base, #1] <= angle[base, #2])&]; path = Line[Join[{base}, sorted, {base}]]; Show[Graphics[{points, path}]] ]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["data = Table[{Random[], Random[]}, {25}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["simpleClosedPath[data];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["data = Table[{Random[], Random[]}, {100}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["simpleClosedPath[data];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["SimpleClosedPath (better version)", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ SimpleClosedPath[l_] := Module[{points, base, remain, angle, sorted, path}, \tpoints = {PointSize[.02], RGBColor[1,0,0], Map[Point,l]}; \t(* base = l[[ Random[Integer, {1, Length[l]}] ]]; *) \tbase = Last[Sort[l,(#2[[2]] > #1[[2]])&]]; \tremain = DeleteCases[l,base]; \tangle[a_,b_]:= Apply[ArcTan, (b - a)]; \tsorted = Sort[remain, (angle[base, #1] <= angle[base, #2])&]; \tpath = Line[Join[{base},sorted,{base}]]; \t \tShow[Graphics[{points, path}]] ]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ data = Table[{Random[],Random[]},{25}]; SimpleClosedPath[data];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Drawing Trees", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "(* The following must be evaluated to read in the definitions\n of the \ tree figures. Place the file Trees.m where \n ", StyleBox["Mathematica", FontSlant->"Italic"], " can find it. If necessary, open Trees.m\n in ", StyleBox["Mathematica", FontSlant->"Italic"], " and evaluate the initialization cell(s).\n*)" }], "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["<< Trees`", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["$DefaultFont = {\"Times-Roman\", 10}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Figure 10.1 A tree with different separations", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[figtree5, \tAspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Figure 10.2 Trees whose children have different separations", \ "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Clear[a,b]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ a = Show[Graphics[t6a, \t\tPlotRange->{-5.3, 0.3}, \t\tAspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ b = Show[Graphics[t6b, \t\tPlotRange->{-5.3, 0.3}, \t\tAspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[GraphicsArray[{a, b}, \tGraphicsSpacing->0.25]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Figure 10.3 Calculation of the separation between children", \ "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Show[Graphics[figtree9]];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Figure 10.4 Results from different tree-drawing algorithms", \ "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Clear[a7,b7]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ a7 = Show[Graphics[figtree7a, \t\tAspectRatio->Automatic, \t\tPlotRange->{-5.3, .25}]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ b7 = Show[Graphics[figtree7b, \t\tAspectRatio->Automatic, \t\tPlotRange->{-5.3, .25}]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[GraphicsArray[{a7, b7}, \tGraphicsSpacing->0.1]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Figure 10.5 A tricky tree to draw", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Show[Graphics[figtree8, \tAspectRatio->Automatic]];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Section 10.5 Sound", "Section", ImageRegion->{{0, 1}, {0, 1}}, CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}], Cell["Play[Sin[256 t (2Pi)], {t, 0, 2}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Options[Play, SampleRate]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Play[Sin[8192 2Pi t], {t, 0, 3}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["digits = RealDigits[N[1/19, 1000]][[1]];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["ListPlay[digits];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ irratdigits = RealDigits[N[Pi, 1000]][[1]]; ListPlay[irratdigits];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Exercises (FM synthesis)", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ fmSynthesis[a_, b_, c_, d_] := \tPlay[Sin[a t + b Sin[c t]], {t, 0, d}]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["fmSynthesis[950, 30, 50, 2]; (* FM bird mating call *)", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["fmSynthesis[312, 30, 5, 5]; (* fly mating call *)", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["fmSynthesis[1850, 300, 15, 5]; (* let's dance *)", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["fmSynthesis[8192, 100, 5, 3]; (* cyber police siren *)", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["White noise, white music", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Just scale - C major", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ c = 261.62558 d = 9/8 c e = 5/4 c f = 4/3 c g = 3/2 c a = 5/3 c b = 15/8 c c2 = 2 c\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Pythagorean scale - C major", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ c = 261.62558 d = 9/8 c e = 81/64 c f = 4/3 c g = 3/2 c a = 27/16 c b = 243/128 c c2 = 2 c\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Equal tempered scale - C major", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ c = 261.62558 d = N[2^(2/12) c] e = N[2^(4/12) c] f = N[2^(5/12) c] g = N[2^(7/12) c] a = N[2^(9/12) c] b = N[2^(11/12) c] c2 = N[2^(12/12) c]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Equal tempered scale - 12 tone, C major", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["cmajor = Table[N[261.62558 2^(j/12)], {j,0,12}]", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Sound graphic (p. 262)", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["notes4 = Take[cmajor, 4]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ x = Do[Play[Sin[notes4[[j]] 2Pi t], {t,0,1}], {j,1,4}] //Timing\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Sound graphic (p. 263", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ tones[freq_] := Play[Sin[2 Pi t freq], {t,0,1}] Map[tones,notes4]; //Timing\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Random notes", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["randomnotes = Table[cmajor[[Random[Integer,{1,12}]]],{20}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Map[tones,randomnotes];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Using a different distribution", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ The function \"note\" generates one of the 8 whole tones in the octave from \ middle C down to C below middle C. The probabilities were chosen somewhat at \ random.\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ note := Which[(r = Random[]) < .05, cmajor[[1]], \tr < .1, cmajor[[2]], \tr < .2, cmajor[[3]], \tr < .3, cmajor[[4]], \tr < .4, cmajor[[5]], \tr < .5, cmajor[[6]], \tr < .7, cmajor[[7]], \tr < .8, cmajor[[8]], \tr < .85, cmajor[[9]], \tr < .9, cmajor[[10]], \tr < .95, cmajor[[11]], \tr <= 1.0, cmajor[[12]] ]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["somenotes = Table[note,{4}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Map[tones,somenotes];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Varying tones and durations", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ tonesAndTimes[freq_,time_]:= \tPlay[Sin[2 Pi t freq], {t,0,time}]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["MapThread[tonesAndTimes, {{189.0,220.0}, {0.5,.25}}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Now to generate white noise, we generate 20 notes and 20 time durations:\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["n20 = Table[note,{20}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["t20 = Table[Random[Integer, {1,4}], {20}]/4 ;", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ This gives a list of fractions 1/4, 1/2, 3/4, 1 corresponding to quarter \ notes, half notes, etc.\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["MapThread[tonesAndTimes,{n20,t20}];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Brownian Noise", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ We want to do a random walk across our list of tones. We will allow steps of \ 0, 1, 2, -1, -2, steps.\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["step := Random[Integer, {-2,2}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["s20 = Table[step, {20}];", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Need to add 1, so that we get no Part[expr, 0] which would return the Head, \ not a position.\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["FoldList[Plus, 6, s20]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["pos = Mod[FoldList[Plus, 4, s20], 11] + 1", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["brown = cmajor[[pos]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Brownian music", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Map[tones, brown];", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["1/f Fractal Noise (raw code - needs improvement)", "Subsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["cmajor16 = Table[N[261.62558 2^(j/12)], {j, 0, 15}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ r := Random[Integer, {1,6}]; g := Random[Integer, {1,6}]; b := Random[Integer, {1,6}];\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ red = 0; green = 0; blue = 0; l = {r + g + b}; n = {{0,0,0}, {0,0,1}, {0,1,0}, {0,1,1}, \t {1,0,0}, {1,0,1}, {1,1,0}, {1,1,1}}; Do[ \tIf[Mod[n[[j, 3]] + n[[j+1, 3]], 2] == 0, red, red=r]; \tIf[Mod[n[[j, 2]] + n[[j+1, 2]], 2] == 0, green, green=g]; \tIf[Mod[n[[j, 1]] + n[[j+1, 1]], 2] == 0, blue, blue=b]; \tAppendTo[l, red + green + blue], {j, 1, 7}] l\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["fractal = Table[cmajor16[[ l[[j]] ]], {j, 1, Length[l]}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["tones[freq_] := Play[Sin[2 Pi t freq], {t, 0, 1}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Map[tones, fractal]", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]]}, Open]]}, Open]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{499, 599}, WindowMargins->{{36, Automatic}, {23, Automatic}}, 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->{ "line1"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "line2"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "point1"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "point2"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "hline"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "vline"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "text1"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "text2"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "text3"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "text4"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "arc"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "randomWalk3D"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "showRandomWalk3D"->{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}]}, "dashc2"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "eqn1"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "eqn2"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "solns"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "rsolns"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "r1"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "r2"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "c"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "c1"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "c2"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "dashc1"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "colorWheel"->{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}]}, "coords"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "points"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "lines"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "path"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "base"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "angle"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "remain"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "simpleClosePath"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "SimpleClosedPath"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "figtree5"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "figtree6"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "figtree7"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "figtree8"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "figtree9"->{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}]}, "digits"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "irratdigits"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "fmSynthesis"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "cmajor"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "notes4"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "tones"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "randomnotes"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "notes"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "somenotes"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "tonesAndTimes"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "step"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "s20"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "pos"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "brown"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "cmajor16"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]}, "fractal"->{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}]} } *) (*CellTagsIndex CellTagsIndex->{ {"line1", 25475, 939}, {"line2", 25711, 945}, {"point1", 25948, 951}, {"point2", 26185, 957}, {"hline", 26421, 963}, {"vline", 26657, 969}, {"text1", 26893, 975}, {"text2", 27129, 981}, {"text3", 27365, 987}, {"text4", 27601, 993}, {"arc", 27835, 999}, {"randomWalk3D", 28078, 1005}, {"showRandomWalk3D", 28325, 1011}, {"dashc2", 28562, 1017}, {"eqn1", 28751, 1022}, {"eqn2", 28940, 1027}, {"solns", 29130, 1032}, {"rsolns", 29321, 1037}, {"r1", 29508, 1042}, {"r2", 29695, 1047}, {"c", 29881, 1052}, {"c1", 30068, 1057}, {"c2", 30255, 1062}, {"dashc1", 30446, 1067}, {"colorWheel", 30641, 1072}, {"coords", 30832, 1077}, {"points", 31098, 1083}, {"lines", 31363, 1089}, {"path", 31627, 1095}, {"base", 31891, 1101}, {"angle", 32156, 1107}, {"remain", 32422, 1113}, {"simpleClosePath", 32697, 1119}, {"SimpleClosedPath", 32973, 1125}, {"figtree5", 33241, 1131}, {"figtree6", 33509, 1137}, {"figtree7", 33777, 1143}, {"figtree8", 34045, 1149}, {"figtree9", 34313, 1155}, {"digits", 34579, 1161}, {"irratdigits", 34864, 1167}, {"fmSynthesis", 35149, 1173}, {"cmajor", 35429, 1179}, {"notes4", 35709, 1185}, {"tones", 35988, 1191}, {"randomnotes", 36273, 1197}, {"notes", 36552, 1203}, {"somenotes", 36835, 1209}, {"tonesAndTimes", 37122, 1215}, {"step", 37400, 1221}, {"s20", 37677, 1227}, {"pos", 37954, 1233}, {"brown", 38233, 1239}, {"cmajor16", 38515, 1245}, {"fractal", 38796, 1251} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 155, 5, 70, "Title"], Cell[1885, 59, 188, 11, 70, "Subsubtitle"], Cell[2076, 72, 138, 4, 70, "Subsubtitle"], Cell[CellGroupData[{ Cell[2237, 78, 100, 3, 70, "Subtitle"], Cell[2340, 83, 74, 1, 70, "Subsubtitle"], Cell[CellGroupData[{ Cell[2437, 86, 107, 1, 70, "Section"], Cell[2547, 89, 786, 57, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[3365, 148, 104, 1, 70, "Section"], Cell[3472, 151, 97, 2, 70, "Input", InitializationCell->True], Cell[3572, 155, 98, 2, 70, "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell[3702, 159, 242, 4, 70, "Section", CellTags->{ "line1", "line2", "point1", "point2", "hline", "vline", "text1", "text2", "text3", "text4", "arc", "randomWalk3D", "showRandomWalk3D"}], Cell[CellGroupData[{ Cell[3967, 165, 100, 2, 70, "Subsection"], Cell[4070, 169, 61, 1, 70, "Input"], Cell[4134, 172, 68, 1, 70, "Input"], Cell[4205, 175, 89, 1, 70, "Input"], Cell[4297, 178, 91, 1, 70, "Input"], Cell[4391, 181, 99, 1, 70, "Input"], Cell[4493, 184, 101, 1, 70, "Input"], Cell[4597, 187, 120, 4, 70, "Input"], Cell[4720, 193, 130, 4, 70, "Input"], Cell[4853, 199, 129, 4, 70, "Input"], Cell[4985, 205, 227, 5, 70, "Input"], Cell[5215, 212, 159, 4, 70, "Input"], Cell[5377, 218, 136, 4, 70, "Input"], Cell[5516, 224, 194, 5, 70, "Input"], Cell[5713, 231, 269, 8, 70, "Input"], Cell[5985, 241, 94, 1, 70, "Input"], Cell[6082, 244, 130, 4, 70, "Input"], Cell[6215, 250, 280, 8, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[6527, 260, 80, 1, 70, "Subsection"], Cell[6610, 263, 205, 6, 70, "Input"], Cell[6818, 271, 131, 4, 70, "Input"], Cell[6952, 277, 122, 4, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[7115, 283, 217, 4, 70, "Section", CellTags->{ "dashc2", "eqn1", "eqn2", "solns", "rsolns", "r1", "r2", "c", "c1", "c2", "dashc1", "colorWheel"}], Cell[CellGroupData[{ Cell[7355, 289, 85, 1, 70, "Subsection"], Cell[7443, 292, 69, 1, 70, "Input"], Cell[7515, 295, 69, 1, 70, "Input"], Cell[7587, 298, 71, 1, 70, "Input"], Cell[7661, 301, 98, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[7791, 304, 155, 5, 70, "Subsection"], Cell[7949, 311, 107, 1, 70, "Input"], Cell[8059, 314, 121, 4, 70, "Input"], Cell[8183, 320, 82, 1, 70, "Input"], Cell[8268, 323, 64, 1, 70, "Input"], Cell[8335, 326, 101, 1, 70, "Input"], Cell[8439, 329, 70, 1, 70, "Input"], Cell[8512, 332, 70, 1, 70, "Input"], Cell[8585, 335, 77, 1, 70, "Input"], Cell[8665, 338, 109, 4, 70, "Input"], Cell[8777, 344, 130, 4, 70, "Input"], Cell[8910, 350, 163, 4, 70, "Input"], Cell[9076, 356, 138, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[9246, 362, 79, 1, 70, "Subsection"], Cell[9328, 365, 178, 6, 70, "Input"], Cell[9509, 373, 159, 4, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[9709, 379, 93, 1, 70, "Section"], Cell[9805, 382, 91, 1, 70, "Input"], Cell[9899, 385, 77, 1, 70, "Input"], Cell[9979, 388, 132, 4, 70, "Input"], Cell[10114, 394, 81, 1, 70, "Input"], Cell[10198, 397, 97, 1, 70, "Input"], Cell[10298, 400, 93, 1, 70, "Input"], Cell[10394, 403, 149, 5, 70, "Input"], Cell[10546, 410, 100, 1, 70, "Input"], Cell[10649, 413, 142, 5, 70, "Input"], Cell[10794, 420, 89, 1, 70, "Input"], Cell[10886, 423, 92, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[11010, 426, 276, 5, 70, "Section", CellTags->{ "coords", "points", "lines", "path", "base", "angle", "remain", "simpleClosePath", "SimpleClosedPath", "figtree5", "figtree6", "figtree7", "figtree8", "figtree9"}], Cell[CellGroupData[{ Cell[11309, 433, 74, 1, 70, "Subsection"], Cell[11386, 436, 103, 1, 70, "Input"], Cell[11492, 439, 92, 1, 70, "Input"], Cell[11587, 442, 77, 1, 70, "Input"], Cell[11667, 445, 108, 1, 70, "Input"], Cell[11778, 448, 70, 1, 70, "Input"], Cell[11851, 451, 125, 4, 70, "Input"], Cell[11979, 457, 172, 5, 70, "Input"], Cell[12154, 464, 103, 1, 70, "Input"], Cell[12260, 467, 98, 1, 70, "Input"], Cell[12361, 470, 85, 1, 70, "Input"], Cell[12449, 473, 78, 1, 70, "Input"], Cell[12530, 476, 105, 1, 70, "Input"], Cell[12638, 479, 77, 1, 70, "Input"], Cell[12718, 482, 65, 1, 70, "Input"], Cell[12786, 485, 126, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[12944, 491, 71, 1, 70, "Subsection"], Cell[13018, 494, 507, 13, 70, "Input"], Cell[13528, 509, 91, 1, 70, "Input"], Cell[13622, 512, 73, 1, 70, "Input"], Cell[13698, 515, 92, 1, 70, "Input"], Cell[13793, 518, 73, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[13898, 521, 88, 1, 70, "Subsection"], Cell[13989, 524, 511, 13, 70, "Input"], Cell[14503, 539, 121, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[14656, 545, 68, 1, 70, "Subsection"], Cell[14727, 548, 400, 10, 70, "Input"], Cell[15130, 560, 59, 1, 70, "Input"], Cell[15192, 563, 86, 1, 70, "Input"], Cell[CellGroupData[{ Cell[15301, 566, 104, 1, 70, "Subsubsection"], Cell[15408, 569, 109, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[15549, 575, 120, 2, 70, "Subsubsection"], Cell[15672, 579, 60, 1, 70, "Input"], Cell[15735, 582, 138, 5, 70, "Input"], Cell[15876, 589, 138, 5, 70, "Input"], Cell[16017, 596, 111, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[16160, 602, 119, 2, 70, "Subsubsection"], Cell[16282, 606, 75, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[16389, 609, 119, 2, 70, "Subsubsection"], Cell[16511, 613, 62, 1, 70, "Input"], Cell[16576, 616, 145, 5, 70, "Input"], Cell[16724, 623, 145, 5, 70, "Input"], Cell[16872, 630, 112, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[17016, 636, 92, 1, 70, "Subsubsection"], Cell[17111, 639, 109, 4, 70, "Input"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[17270, 645, 275, 5, 70, "Section", CellTags->{ "digits", "irratdigits", "fmSynthesis", "cmajor", "notes4", "tones", "randomnotes", "notes", "somenotes", "tonesAndTimes", "step", "s20", "pos", "brown", "cmajor16", "fractal"}], Cell[17548, 652, 83, 1, 70, "Input"], Cell[17634, 655, 75, 1, 70, "Input"], Cell[17712, 658, 83, 1, 70, "Input"], Cell[17798, 661, 90, 1, 70, "Input"], Cell[17891, 664, 67, 1, 70, "Input"], Cell[17961, 667, 124, 4, 70, "Input"], Cell[CellGroupData[{ Cell[18108, 673, 80, 1, 70, "Subsection"], Cell[18191, 676, 129, 4, 70, "Input"], Cell[18323, 682, 107, 1, 70, "Input"], Cell[18433, 685, 103, 1, 70, "Input"], Cell[18539, 688, 99, 1, 70, "Input"], Cell[18641, 691, 106, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[18779, 694, 79, 1, 70, "Subsection"], Cell[CellGroupData[{ Cell[18881, 697, 78, 1, 70, "Subsubsection"], Cell[18962, 700, 141, 10, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[19135, 712, 85, 1, 70, "Subsubsection"], Cell[19223, 715, 148, 10, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[19403, 727, 88, 1, 70, "Subsubsection"], Cell[19494, 730, 200, 10, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[19726, 742, 97, 1, 70, "Subsubsection"], Cell[19826, 745, 97, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[19955, 748, 80, 1, 70, "Subsubsection"], Cell[20038, 751, 74, 1, 70, "Input"], Cell[20115, 754, 122, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[20269, 760, 79, 1, 70, "Subsubsection"], Cell[20351, 763, 133, 4, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[20516, 769, 70, 1, 70, "Subsubsection"], Cell[20589, 772, 108, 1, 70, "Input"], Cell[20700, 775, 73, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[20805, 778, 88, 1, 70, "Subsubsection"], Cell[20896, 781, 222, 5, 70, "Text"], Cell[21121, 788, 367, 15, 70, "Input"], Cell[21491, 805, 77, 1, 70, "Input"], Cell[21571, 808, 71, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[21674, 811, 85, 1, 70, "Subsubsection"], Cell[21762, 814, 123, 4, 70, "Input"], Cell[21888, 820, 103, 1, 70, "Input"], Cell[21994, 823, 129, 3, 70, "Text"], Cell[22126, 828, 73, 1, 70, "Input"], Cell[22202, 831, 95, 1, 70, "Input"], Cell[22300, 834, 155, 4, 70, "Text"], Cell[22458, 840, 85, 1, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[22584, 843, 69, 1, 70, "Subsection"], Cell[22656, 846, 159, 4, 70, "Text"], Cell[22818, 852, 81, 1, 70, "Input"], Cell[22902, 855, 74, 1, 70, "Input"], Cell[22979, 858, 150, 4, 70, "Text"], Cell[23132, 864, 72, 1, 70, "Input"], Cell[23207, 867, 91, 1, 70, "Input"], Cell[23301, 870, 71, 1, 70, "Input"], Cell[CellGroupData[{ Cell[23395, 873, 72, 1, 70, "Subsubsection"], Cell[23470, 876, 68, 1, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[23579, 879, 103, 1, 70, "Subsection"], Cell[23685, 882, 101, 1, 70, "Input"], Cell[23789, 885, 144, 5, 70, "Input"], Cell[23936, 892, 411, 13, 70, "Input"], Cell[24350, 907, 106, 1, 70, "Input"], Cell[24459, 910, 99, 1, 70, "Input"], Cell[24561, 913, 69, 1, 70, "Input"] }, Closed]] }, Closed]] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)