(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 18290, 515] NotebookOptionsPosition[ 17298, 480] NotebookOutlinePosition[ 17644, 495] CellTagsIndexPosition[ 17601, 492] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"(*", RowBox[{ RowBox[{ "Mathematica", " ", "code", " ", "to", " ", "draw", " ", "the", " ", "Schwarz"}], "-", RowBox[{ "Christoffel", " ", "map", " ", "for", " ", "a", " ", "rectrangle", " ", "using", " ", "power", " ", RowBox[{"seties", ".", "You"}], " ", "can", " ", "set", " ", "the", " ", "degree", " ", "of", " ", "the", " ", "truncation", " ", "of", " ", "the", " ", "series", " ", "and", " ", "the", " ", "eccentricty", " ", "of", " ", "the", " ", "rectangle", " ", RowBox[{"(", RowBox[{ "by", " ", "setting", " ", "the", " ", "harmonic", " ", "measure", " ", "of", " ", "the", " ", "shorter", " ", "sides"}]}]}]}], "*)"}]], "Input",\ CellChangeTimes->{{3.462104275182789*^9, 3.462104284844619*^9}, { 3.462104423004213*^9, 3.462104461738542*^9}, {3.46210451680017*^9, 3.462104551413349*^9}, {3.462104878672758*^9, 3.462104923136732*^9}, { 3.462105261320132*^9, 3.462105270876612*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"ctor", "[", "z_", "]"}], ":=", RowBox[{"(", RowBox[{ RowBox[{"output", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"output", ",", RowBox[{"{", RowBox[{ RowBox[{"Re", "[", RowBox[{"z", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], ",", RowBox[{"Im", "[", RowBox[{"z", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "z", "]"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", "output"}], ")"}]}], ";"}]], "Input", CellChangeTimes->{{3.462104275182789*^9, 3.462104284844619*^9}, { 3.462104423004213*^9, 3.462104461738542*^9}, {3.46210451680017*^9, 3.462104551413349*^9}, {3.462104878672758*^9, 3.462104923136732*^9}, { 3.462105261320132*^9, 3.462105270876612*^9}, {3.462107902766371*^9, 3.462107910400586*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"plotpolylistCA", "[", "vert_", "]"}], ":=", RowBox[{"(", RowBox[{ RowBox[{"vert3", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"vert1", "=", RowBox[{"ctor", "[", RowBox[{"vert", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"vert3", ",", "vert1"}], "]"}], ";"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "vert", "]"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"plotpolylist", "[", "vert3", "]"}]}], ")"}]}]], "Input", CellChangeTimes->{{3.462104275182789*^9, 3.462104284844619*^9}, { 3.462104423004213*^9, 3.462104461738542*^9}, {3.46210451680017*^9, 3.462104551413349*^9}, {3.462104878672758*^9, 3.462104923136732*^9}, 3.462105903742987*^9, 3.462106805108303*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"plotpolylist", "[", "vertlist_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{"(*", RowBox[{ RowBox[{"GrayLevel", "[", "1", "]"}], ",", RowBox[{"Thickness", "[", ".01", "]"}], ",", RowBox[{"{", RowBox[{"Polygon", "[", RowBox[{"vertlist", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], "}"}], ","}], "*)"}], RowBox[{ RowBox[{"GrayLevel", "[", RowBox[{"If", "[", RowBox[{ RowBox[{"k", "\[Equal]", RowBox[{"Length", "[", "vertlist", "]"}]}], ",", "0", ",", ".1"}], "]"}], "]"}], ",", RowBox[{"Thickness", "[", RowBox[{"If", "[", RowBox[{ RowBox[{"k", "\[Equal]", RowBox[{"Length", "[", "vertlist", "]"}]}], ",", ".005", ",", ".005"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"Line", "[", RowBox[{"vertlist", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Axes", "\[Rule]", "None"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "vertlist", "]"}]}], "}"}]}], "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.462104275182789*^9, 3.462104284844619*^9}, { 3.462104423004213*^9, 3.462104461738542*^9}, {3.46210451680017*^9, 3.462104551413349*^9}, {3.462104878672758*^9, 3.462104915531686*^9}}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.462104275182789*^9, 3.462104284844619*^9}, { 3.462104423004213*^9, 3.462104461738542*^9}, {3.46210451680017*^9, 3.462104551413349*^9}, {3.462104878672758*^9, 3.462104915531686*^9}, { 3.462106018742973*^9, 3.462106028533409*^9}, {3.462106182551709*^9, 3.462106190408297*^9}, 3.462106409287554*^9, 3.462107915012148*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"drawSCnew", "[", RowBox[{"para_", ",", "alpha_", ",", "num_"}], "]"}], ":=", RowBox[{"(", RowBox[{ RowBox[{"scseries", "=", RowBox[{"Normal", "[", RowBox[{"Integrate", "[", RowBox[{ RowBox[{"Product", "[", RowBox[{ RowBox[{"Series", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"zeta", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", "I"}], " ", RowBox[{"para", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}]}]}], ")"}], "^", RowBox[{"{", RowBox[{ RowBox[{"alpha", "[", RowBox[{"[", "k", "]"}], "]"}], "-", "1"}], "}"}]}], ",", RowBox[{"{", RowBox[{"zeta", ",", "0", ",", "num"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "para", "]"}]}], "}"}]}], "]"}], ",", "zeta"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"coeff", "=", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Coefficient", "[", RowBox[{"scseries", ",", RowBox[{"zeta", "^", "k"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "num"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"coeff", "[", RowBox[{"[", "k", "]"}], "]"}], " ", RowBox[{"x", "^", "k"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "num"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"out", "=", RowBox[{"{", RowBox[{"f", "[", RowBox[{"Exp", "[", RowBox[{"I", " ", "para"}], "]"}], "]"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"out", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"numpts", "=", "200"}], ";", "\[IndentingNewLine]", RowBox[{"drawcircle", "=", RowBox[{"f", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", ".5", ")"}], RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", "Pi", " ", RowBox[{"k", "/", "numpts"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "numpts"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"out", ",", "drawcircle"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"drawcircle", "=", RowBox[{"f", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", ".75", ")"}], RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", "Pi", " ", RowBox[{"k", "/", "numpts"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "numpts"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"out", ",", "drawcircle"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"drawcircle", "=", RowBox[{"f", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", ".9", ")"}], RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", "Pi", " ", RowBox[{"k", "/", "numpts"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "numpts"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"out", ",", "drawcircle"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"numpts", "=", "10000"}], ";", "\[IndentingNewLine]", RowBox[{"drawcircle", "=", RowBox[{"f", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Exp", "[", RowBox[{"I", " ", "2", " ", "Pi", " ", RowBox[{"k", "/", "numpts"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "numpts"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"out", ",", "drawcircle"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"pts", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"j", "/", "10"}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "9"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"1", "-", RowBox[{ RowBox[{"(", ".1", ")"}], RowBox[{ RowBox[{"(", ".8", ")"}], "^", "j"}]}]}], ",", RowBox[{"{", RowBox[{"j", ",", "0", ",", "20"}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"pts", ",", "1"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"out", ",", RowBox[{"f", "[", RowBox[{"pts", " ", RowBox[{"Exp", "[", RowBox[{"I", " ", RowBox[{"para", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}]}], "]"}]}], "]"}], ";"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "para", "]"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"plotpolylistCA", "[", "out", "]"}]}], ")"}]}], "\[IndentingNewLine]", " ", "\n", "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.462106460655113*^9, 3.462106465000393*^9}, { 3.462106496859973*^9, 3.462106501331073*^9}, {3.462106561544139*^9, 3.462106562167925*^9}, 3.462106797264985*^9}], Cell[BoxData[ RowBox[{ RowBox[{"drawsquare", "[", "n_", "]"}], ":=", RowBox[{"(", RowBox[{ RowBox[{"para", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Pi", "/", "4"}], "+", " ", RowBox[{"2", " ", "Pi", " ", RowBox[{"k", "/", "4"}]}]}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", "4"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"alpha", "=", RowBox[{"{", RowBox[{".5", ",", ".5", ",", ".5", ",", ".5"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"drawSCnew", "[", RowBox[{"para", ",", "alpha", ",", "n"}], "]"}]}], ")"}]}]], "Input", CellChangeTimes->{{3.462104275182789*^9, 3.462104284844619*^9}, { 3.462106976011831*^9, 3.462106981182578*^9}, {3.46210707188634*^9, 3.462107078157836*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"drawrect", "[", RowBox[{"n_", ",", "prob_"}], "]"}], ":=", RowBox[{"(", RowBox[{ RowBox[{"epsilon", "=", RowBox[{"Pi", " ", RowBox[{"prob", "/", "2"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"para", "=", RowBox[{"{", RowBox[{"epsilon", ",", RowBox[{"Pi", "-", "epsilon"}], ",", RowBox[{"Pi", "+", "epsilon"}], ",", RowBox[{ RowBox[{"2", " ", "Pi"}], "-", "epsilon"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"alpha", "=", RowBox[{"{", RowBox[{".5", ",", ".5", ",", ".5", ",", ".5"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"drawSCnew", "[", RowBox[{"para", ",", "alpha", ",", "n"}], "]"}]}], ")"}]}]], "Input", CellChangeTimes->{{3.462104275182789*^9, 3.462104279157202*^9}, { 3.462106978756604*^9, 3.462106979513111*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"ctor", "[", RowBox[{"{", RowBox[{"0", ",", "1", ",", "I", ",", RowBox[{"1", "+", "I"}]}], "}"}], "]"}]}]], "Input", CellChangeTimes->{{3.46210787487809*^9, 3.462107888606958*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.462107890250672*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"plotpolylist", "[", RowBox[{"{", RowBox[{"ctor", "[", RowBox[{"{", RowBox[{"0", ",", "1", ",", "I", ",", RowBox[{"1", "+", "I"}]}], "}"}], "]"}], "}"}], "]"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.462104349087411*^9, 3.462104357622069*^9}, { 3.462104577619106*^9, 3.462104631710691*^9}, {3.462105169094328*^9, 3.462105189134006*^9}, {3.462105344279113*^9, 3.462105352276629*^9}, { 3.462105475674378*^9, 3.462105500550811*^9}, {3.462105562639056*^9, 3.462105585686806*^9}, {3.462105866025231*^9, 3.462105867171629*^9}}], Cell[BoxData[ GraphicsBox[ {GrayLevel[0], Thickness[0.005], LineBox[{{0, 0}, {1, 0}, {0, 1}, {1, 1}}]}, AspectRatio->Automatic, Axes->None, PlotRange->All]], "Output", CellChangeTimes->{3.4621055879222*^9, 3.462105868588369*^9, 3.462106588256412*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"plotpolylistCA", "[", RowBox[{"{", RowBox[{"{", RowBox[{"0", ",", "1", ",", "I", ",", "2"}], "}"}], "}"}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", " "}]}]], "Input", CellChangeTimes->{{3.462106060837498*^9, 3.462106078648607*^9}, { 3.462106592637882*^9, 3.462106682699172*^9}, {3.462106720079135*^9, 3.462106738533843*^9}, {3.462106785444192*^9, 3.46210683326018*^9}, { 3.462106884703816*^9, 3.462106886749743*^9}, {3.462106918640766*^9, 3.462106947605814*^9}}], Cell[BoxData[ GraphicsBox[ {GrayLevel[0], Thickness[0.005], LineBox[{{0, 0}, {1, 0}, {0, 1}, {2, 0}}]}, AspectRatio->Automatic, Axes->None, PlotRange->All]], "Output", CellChangeTimes->{ 3.462106741137978*^9, 3.462106787537497*^9, {3.462106835133531*^9, 3.462106854656829*^9}, 3.462106888637239*^9, {3.462106921876264*^9, 3.462106950473111*^9}}] }, Open ]], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{ RowBox[{"drawsquare", "[", "10", "]"}], "\[IndentingNewLine]"}]}]], "Input",\ CellChangeTimes->{{3.462106954815937*^9, 3.462106962493311*^9}, 3.462107100438797*^9, {3.462107145026772*^9, 3.46210715526301*^9}, { 3.462107258598293*^9, 3.462107288192714*^9}, {3.462275567287303*^9, 3.462275567631053*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"drawrect", "[", RowBox[{"10", ",", ".1"}], "]"}]}]], "Input", CellChangeTimes->{{3.462107308208208*^9, 3.462107327033823*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"drawrect", "[", RowBox[{"n", ",", "p"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "10", ",", "500"}], "}"}], ",", RowBox[{"{", RowBox[{"p", ",", ".001", ",", ".5"}], "}"}]}], "]"}], "\n"}]], "Input", CellChangeTimes->{ 3.462104275182789*^9, 3.462107122331189*^9, {3.462107183100169*^9, 3.462107183893986*^9}, {3.462107388229379*^9, 3.462107399498465*^9}, { 3.462107561421508*^9, 3.462107577541723*^9}}] }, WindowSize->{639, 750}, WindowMargins->{{150, Automatic}, {Automatic, 52}}, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (November 10, 2008)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 993, 21, 92, "Input"], Cell[1541, 43, 1098, 28, 72, "Input"], Cell[2642, 73, 991, 24, 92, "Input"], Cell[3636, 99, 1841, 47, 172, "Input"], Cell[5480, 148, 381, 5, 31, "Input"], Cell[5864, 155, 6022, 159, 532, "Input"], Cell[11889, 316, 841, 23, 72, "Input"], Cell[12733, 341, 891, 24, 92, "Input"], Cell[CellGroupData[{ Cell[13649, 369, 253, 6, 52, "Input"], Cell[13905, 377, 331, 11, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[14273, 393, 659, 14, 72, "Input"], Cell[14935, 409, 266, 8, 374, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[15238, 422, 578, 12, 92, "Input"], Cell[15819, 436, 368, 10, 202, "Output"] }, Open ]], Cell[16202, 449, 376, 8, 72, "Input"], Cell[16581, 459, 189, 4, 52, "Input"], Cell[16773, 465, 521, 13, 52, "Input"] } ] *) (* End of internal cache information *)