(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 57069, 1296] NotebookOptionsPosition[ 54857, 1215] NotebookOutlinePosition[ 55498, 1240] CellTagsIndexPosition[ 55455, 1237] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["Subdivision Algorithms", "Title", CellChangeTimes->{{3.393948451646284*^9, 3.3939484538061733`*^9}, { 3.395308001140367*^9, 3.395308006653427*^9}, {3.3953111276553698`*^9, 3.395311131016778*^9}, {3.395311236055582*^9, 3.395311237812146*^9}, { 3.4680658343222437`*^9, 3.4680658346010733`*^9}}], Cell["\<\ Lane-Risenfeld and De Casteljau \ \>", "Subtitle", CellChangeTimes->{ 3.392745257825647*^9, {3.393948458934814*^9, 3.3939484607150106`*^9}, 3.395308014645043*^9, {3.395311134742841*^9, 3.395311156389769*^9}, { 3.468065837656012*^9, 3.4680658381126423`*^9}}], Cell[CellGroupData[{ Cell[TextData[StyleBox["De Casteljau in the Plane", FontColor->RGBColor[0.500008, 0, 0.500008]]], "Section", CellChangeTimes->{{3.392758194656892*^9, 3.392758230699077*^9}, { 3.3927582846772323`*^9, 3.3927583008105917`*^9}, {3.392759535888862*^9, 3.392759536169268*^9}, {3.393948465630563*^9, 3.393948469625586*^9}, { 3.395265138849379*^9, 3.395265157935622*^9}, {3.395401154871052*^9, 3.3954011570326014`*^9}, {3.395402123208124*^9, 3.39540212486828*^9}, { 3.395420143635604*^9, 3.39542014761077*^9}}], Cell[CellGroupData[{ Cell["Setup", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.395238896245988*^9, 3.39523889916641*^9}, {3.395238984458644*^9, 3.3952389862597*^9}, {3.395308156744919*^9, 3.395308160533*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{ "average", ",", "deCast", ",", "leftsubd", ",", "rightsubd", ",", "subd"}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"average", "[", RowBox[{"pt_", ",", "qt_"}], "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"pt", "+", "qt"}], ")"}], "/", "2"}]}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"deCast", "[", "cpts_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dpts", "=", RowBox[{"{", "cpts", "}"}]}], "}"}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", "cpts", "]"}], "\[Equal]", "1"}], ",", "dpts", ",", RowBox[{"Do", "[", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"dpts", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"average", "[", RowBox[{ RowBox[{"dpts", "[", RowBox[{"[", RowBox[{"k", ",", "i"}], "]"}], "]"}], ",", " ", RowBox[{"dpts", "[", RowBox[{"[", RowBox[{"k", ",", RowBox[{"i", "+", "1"}]}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"Length", "[", RowBox[{"dpts", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], "-", "1"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{ RowBox[{"Length", "[", "cpts", "]"}], "-", "1"}]}], "}"}]}], "]"}]}], "]"}], ";", "dpts"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"leftsubd", "[", "cpts_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"First", "[", RowBox[{ RowBox[{"deCast", "[", "cpts", "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "cpts", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"rightsubd", "[", "cpts_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Last", "[", RowBox[{ RowBox[{"deCast", "[", "cpts", "]"}], "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"Length", "[", "cpts", "]"}], ",", "1", ",", RowBox[{"-", "1"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"subd", "[", "cpts_", "]"}], ":=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"leftsubd", "[", RowBox[{"cpts", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], ",", RowBox[{"rightsubd", "[", RowBox[{"cpts", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"Length", "[", "cpts", "]"}]}], "}"}]}], "]"}], ",", "1"}], "]"}]}]}], "Input", CellChangeTimes->{{3.3950632434097347`*^9, 3.3950633381644907`*^9}, { 3.395063381486239*^9, 3.395063382499621*^9}, {3.395065890409404*^9, 3.395065912318673*^9}, {3.395065943063346*^9, 3.395065972452845*^9}, 3.3950660089810123`*^9, {3.395081865494526*^9, 3.395081905300699*^9}, { 3.39526524284124*^9, 3.395265272676505*^9}, {3.395265379278658*^9, 3.39526538389228*^9}, {3.395401161282282*^9, 3.395401190439842*^9}, { 3.395581296731246*^9, 3.395581346260687*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Quadratic", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.3950677216214447`*^9, 3.3950677223425827`*^9}, {3.3954021552067957`*^9, 3.39540215726757*^9}, {3.395429086903798*^9, 3.395429088912702*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dpts", "=", RowBox[{"{", "cpts", "}"}]}], "}"}], ",", RowBox[{ RowBox[{"dpts", "=", RowBox[{"Nest", "[", RowBox[{"subd", ",", "dpts", ",", "level"}], "]"}]}], ";", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "cpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "dpts", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "250"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "4"}], "}"}]}], "}"}]}]}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"cpts", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "0"}], "}"}]}], "}"}]}], "}"}], ",", "Locator"}], "}"}], ",", RowBox[{"{", RowBox[{"level", ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "2", ",", "3", ",", "4"}], "}"}]}], "}"}]}], "]"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.393589714687162*^9, 3.393589725857065*^9}, { 3.3935897565050707`*^9, 3.3935898092833147`*^9}, {3.393589933171867*^9, 3.3935900235779343`*^9}, {3.3935901275909567`*^9, 3.393590219864011*^9}, { 3.393590272700382*^9, 3.3935903915167017`*^9}, {3.393590527131462*^9, 3.393590585571598*^9}, {3.3935908779403057`*^9, 3.393590892530198*^9}, 3.3935909346500683`*^9, {3.39359101337705*^9, 3.393591020870512*^9}, { 3.3935910844021177`*^9, 3.393591092356909*^9}, {3.3935911323620787`*^9, 3.393591162102852*^9}, {3.3935912271310387`*^9, 3.393591228133822*^9}, { 3.393591344253921*^9, 3.393591404928492*^9}, 3.393591562366597*^9, { 3.3935916397270947`*^9, 3.393591707435124*^9}, {3.393591765347765*^9, 3.393591839722109*^9}, {3.393591996254627*^9, 3.393591998586124*^9}, { 3.3935920435318403`*^9, 3.3935921235118027`*^9}, {3.393592166537344*^9, 3.3935921896911783`*^9}, {3.393592222478014*^9, 3.393592383434339*^9}, { 3.39359911506677*^9, 3.393599142112351*^9}, {3.393599174937352*^9, 3.393599313733667*^9}, {3.3935994357176437`*^9, 3.393599454925482*^9}, 3.393599505121211*^9, {3.393599536516963*^9, 3.393599571441728*^9}, { 3.3935997156516037`*^9, 3.393599719650565*^9}, {3.395425085868277*^9, 3.395425124672393*^9}, {3.395425170259124*^9, 3.3954251990892076`*^9}, { 3.395425232190833*^9, 3.3954252618516397`*^9}, {3.395425353523493*^9, 3.395425357900023*^9}, {3.395425439185224*^9, 3.3954254709084263`*^9}, 3.39542552750281*^9, 3.395425628365217*^9, {3.395425664907221*^9, 3.3954257162011003`*^9}, {3.395425752129518*^9, 3.3954257972082367`*^9}, { 3.395425829948001*^9, 3.3954258311272173`*^9}, {3.395425931925137*^9, 3.395425973905016*^9}, {3.395426019989085*^9, 3.395426025719019*^9}, { 3.395426090408142*^9, 3.395426160080297*^9}, {3.3954261905296907`*^9, 3.395426213718292*^9}, 3.3954262743234797`*^9, 3.395426346186215*^9, { 3.395426386763761*^9, 3.395426511329097*^9}, {3.395426597723218*^9, 3.395426599810129*^9}, {3.395426702979994*^9, 3.395426844608193*^9}, { 3.395426982386313*^9, 3.395426983162035*^9}, {3.395427164443199*^9, 3.3954272269463587`*^9}, {3.395427261828175*^9, 3.395427265783296*^9}, { 3.3954274468796473`*^9, 3.3954275409133787`*^9}, {3.395427584199439*^9, 3.395427587369267*^9}, {3.395427631884698*^9, 3.39542768396945*^9}, { 3.395427749549211*^9, 3.395427782842695*^9}, {3.395427817480939*^9, 3.395427832746813*^9}, 3.395427929635738*^9, {3.395427963024822*^9, 3.395428010391851*^9}, {3.395428134274081*^9, 3.395428134913748*^9}, { 3.395428181608272*^9, 3.395428183550942*^9}, {3.3954282212004623`*^9, 3.395428281798979*^9}, {3.395428400378549*^9, 3.395428446579515*^9}, { 3.3954284803874397`*^9, 3.395428525774808*^9}, {3.3955010887600737`*^9, 3.395501144181041*^9}, {3.395501181427718*^9, 3.3955012200513287`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`cpts$$ = {{0, 0}, {0.28000000000000025`, 1.8599999999999999`}, {2, 0}}, $CellContext`level$$ = 4, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`cpts$$], {{0, 0}, {1, 1}, {2, 0}}}, Automatic}, { Hold[$CellContext`level$$], {0, 1, 2, 3, 4}}}, Typeset`size$$ = { 500., {240., 260.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`level$756$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`cpts$$ = {{0, 0}, {1, 1}, {2, 0}}, $CellContext`level$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`level$$, $CellContext`level$756$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`dpts$ = {$CellContext`cpts$$}}, $CellContext`dpts$ = Nest[$CellContext`subd, $CellContext`dpts$, $CellContext`level$$]; Graphics[{{ Thickness[0.004], Line[$CellContext`cpts$$]}, {Blue, Thickness[0.004], Line[$CellContext`dpts$]}}, Axes -> False, ImageSize -> 250, AspectRatio -> Automatic, PlotRange -> {{-2, 4}, {-2, 4}}]], "Specifications" :> {{{$CellContext`cpts$$, {{0, 0}, {1, 1}, {2, 0}}}, Automatic, ControlType -> Locator}, {$CellContext`level$$, {0, 1, 2, 3, 4}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{593., {329.6875, 340.3125}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.395501146265546*^9, {3.3955011984848127`*^9, 3.395501221619611*^9}, 3.395507979908699*^9, 3.395581358829031*^9, 3.468065930486279*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Cubic", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.3950677216214447`*^9, 3.3950677223425827`*^9}, {3.3954021552067957`*^9, 3.39540215726757*^9}, {3.395429086903798*^9, 3.395429110065542*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dpts", "=", RowBox[{"{", "cpts", "}"}]}], "}"}], ",", RowBox[{ RowBox[{"dpts", "=", RowBox[{"Nest", "[", RowBox[{"subd", ",", "dpts", ",", "level"}], "]"}]}], ";", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "cpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "dpts", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "250"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "3"}], "}"}]}], "}"}]}]}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"cpts", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{".5", ",", "1.5"}], "}"}], ",", RowBox[{"{", RowBox[{"2.5", ",", "1.5"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "0"}], "}"}]}], "}"}]}], "}"}], ",", "Locator"}], "}"}], ",", RowBox[{"{", RowBox[{"level", ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "2", ",", "3", ",", "4"}], "}"}]}], "}"}]}], "]"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.393589714687162*^9, 3.393589725857065*^9}, { 3.3935897565050707`*^9, 3.3935898092833147`*^9}, {3.393589933171867*^9, 3.3935900235779343`*^9}, {3.3935901275909567`*^9, 3.393590219864011*^9}, { 3.393590272700382*^9, 3.3935903915167017`*^9}, {3.393590527131462*^9, 3.393590585571598*^9}, {3.3935908779403057`*^9, 3.393590892530198*^9}, 3.3935909346500683`*^9, {3.39359101337705*^9, 3.393591020870512*^9}, { 3.3935910844021177`*^9, 3.393591092356909*^9}, {3.3935911323620787`*^9, 3.393591162102852*^9}, {3.3935912271310387`*^9, 3.393591228133822*^9}, { 3.393591344253921*^9, 3.393591404928492*^9}, 3.393591562366597*^9, { 3.3935916397270947`*^9, 3.393591707435124*^9}, {3.393591765347765*^9, 3.393591839722109*^9}, {3.393591996254627*^9, 3.393591998586124*^9}, { 3.3935920435318403`*^9, 3.3935921235118027`*^9}, {3.393592166537344*^9, 3.3935921896911783`*^9}, {3.393592222478014*^9, 3.393592383434339*^9}, { 3.39359911506677*^9, 3.393599142112351*^9}, {3.393599174937352*^9, 3.393599313733667*^9}, {3.3935994357176437`*^9, 3.393599454925482*^9}, 3.393599505121211*^9, {3.393599536516963*^9, 3.393599571441728*^9}, { 3.3935997156516037`*^9, 3.393599719650565*^9}, {3.395425085868277*^9, 3.395425124672393*^9}, {3.395425170259124*^9, 3.3954251990892076`*^9}, { 3.395425232190833*^9, 3.3954252618516397`*^9}, {3.395425353523493*^9, 3.395425357900023*^9}, {3.395425439185224*^9, 3.3954254709084263`*^9}, 3.39542552750281*^9, 3.395425628365217*^9, {3.395425664907221*^9, 3.3954257162011003`*^9}, {3.395425752129518*^9, 3.3954257972082367`*^9}, { 3.395425829948001*^9, 3.3954258311272173`*^9}, {3.395425931925137*^9, 3.395425973905016*^9}, {3.395426019989085*^9, 3.395426025719019*^9}, { 3.395426090408142*^9, 3.395426160080297*^9}, {3.3954261905296907`*^9, 3.395426213718292*^9}, 3.3954262743234797`*^9, 3.395426346186215*^9, { 3.395426386763761*^9, 3.395426511329097*^9}, {3.395426597723218*^9, 3.395426599810129*^9}, {3.395426702979994*^9, 3.395426844608193*^9}, { 3.395426982386313*^9, 3.395426983162035*^9}, {3.395427164443199*^9, 3.3954272269463587`*^9}, {3.395427261828175*^9, 3.395427265783296*^9}, { 3.3954274468796473`*^9, 3.3954275409133787`*^9}, {3.395427584199439*^9, 3.395427587369267*^9}, {3.395427631884698*^9, 3.39542768396945*^9}, { 3.395427749549211*^9, 3.395427782842695*^9}, {3.395427817480939*^9, 3.395427832746813*^9}, 3.395427929635738*^9, {3.395427963024822*^9, 3.395428010391851*^9}, {3.395428134274081*^9, 3.395428134913748*^9}, { 3.395428181608272*^9, 3.395428183550942*^9}, {3.3954282212004623`*^9, 3.395428281798979*^9}, {3.395428400378549*^9, 3.395428446579515*^9}, { 3.3954284803874397`*^9, 3.395428525774808*^9}, 3.39542890754075*^9, { 3.39542894619464*^9, 3.3954289482267733`*^9}, {3.395501278180587*^9, 3.395501302915753*^9}, {3.395501377222764*^9, 3.395501379354026*^9}, 3.39550141791908*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`cpts$$ = {{0, 0}, {0.5, 1.5}, {2.4, 2.105}, {3, 0}}, $CellContext`level$$ = 4, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`cpts$$], {{0, 0}, {0.5, 1.5}, {2.5, 1.5}, {3, 0}}}, Automatic}, { Hold[$CellContext`level$$], {0, 1, 2, 3, 4}}}, Typeset`size$$ = { 500., {190., 210.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`level$782$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`cpts$$ = {{0, 0}, {0.5, 1.5}, {2.5, 1.5}, { 3, 0}}, $CellContext`level$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`level$$, $CellContext`level$782$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`dpts$ = {$CellContext`cpts$$}}, $CellContext`dpts$ = Nest[$CellContext`subd, $CellContext`dpts$, $CellContext`level$$]; Graphics[{{ Thickness[0.004], Line[$CellContext`cpts$$]}, {Blue, Thickness[0.004], Line[$CellContext`dpts$]}}, Axes -> False, ImageSize -> 250, AspectRatio -> Automatic, PlotRange -> {{-1, 4}, {-1, 3}}]], "Specifications" :> {{{$CellContext`cpts$$, {{0, 0}, {0.5, 1.5}, {2.5, 1.5}, {3, 0}}}, Automatic, ControlType -> Locator}, {$CellContext`level$$, {0, 1, 2, 3, 4}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{593., {279.6875, 290.3125}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.395428949408214*^9, 3.395501304286783*^9, {3.395501360574356*^9, 3.395501380720398*^9}, 3.3955014195569*^9, 3.395501454351367*^9, 3.3955079724062862`*^9, 3.395581395075275*^9, 3.3955814261279716`*^9, 3.468065930548567*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Sextic", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.3950677216214447`*^9, 3.3950677223425827`*^9}, {3.3954021552067957`*^9, 3.39540215726757*^9}, {3.395429086903798*^9, 3.395429110065542*^9}, { 3.4680661212518063`*^9, 3.468066124104827*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dpts", "=", RowBox[{"{", "cpts", "}"}]}], "}"}], ",", RowBox[{ RowBox[{"dpts", "=", RowBox[{"Nest", "[", RowBox[{"subd", ",", "dpts", ",", "level"}], "]"}]}], ";", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "cpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "dpts", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "250"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "5"}], ",", "5"}], "}"}]}], "}"}]}]}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"cpts", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"-", "4"}]}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "4"}], "}"}]}], "}"}]}], "}"}], ",", "Locator"}], "}"}], ",", RowBox[{"{", RowBox[{"level", ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "2", ",", "3", ",", "4"}], "}"}]}], "}"}]}], "]"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.393589714687162*^9, 3.393589725857065*^9}, { 3.3935897565050707`*^9, 3.3935898092833147`*^9}, {3.393589933171867*^9, 3.3935900235779343`*^9}, {3.3935901275909567`*^9, 3.393590219864011*^9}, { 3.393590272700382*^9, 3.3935903915167017`*^9}, {3.393590527131462*^9, 3.393590585571598*^9}, {3.3935908779403057`*^9, 3.393590892530198*^9}, 3.3935909346500683`*^9, {3.39359101337705*^9, 3.393591020870512*^9}, { 3.3935910844021177`*^9, 3.393591092356909*^9}, {3.3935911323620787`*^9, 3.393591162102852*^9}, {3.3935912271310387`*^9, 3.393591228133822*^9}, { 3.393591344253921*^9, 3.393591404928492*^9}, 3.393591562366597*^9, { 3.3935916397270947`*^9, 3.393591707435124*^9}, {3.393591765347765*^9, 3.393591839722109*^9}, {3.393591996254627*^9, 3.393591998586124*^9}, { 3.3935920435318403`*^9, 3.3935921235118027`*^9}, {3.393592166537344*^9, 3.3935921896911783`*^9}, {3.393592222478014*^9, 3.393592383434339*^9}, { 3.39359911506677*^9, 3.393599142112351*^9}, {3.393599174937352*^9, 3.393599313733667*^9}, {3.3935994357176437`*^9, 3.393599454925482*^9}, 3.393599505121211*^9, {3.393599536516963*^9, 3.393599571441728*^9}, { 3.3935997156516037`*^9, 3.393599719650565*^9}, {3.395425085868277*^9, 3.395425124672393*^9}, {3.395425170259124*^9, 3.3954251990892076`*^9}, { 3.395425232190833*^9, 3.3954252618516397`*^9}, {3.395425353523493*^9, 3.395425357900023*^9}, {3.395425439185224*^9, 3.3954254709084263`*^9}, 3.39542552750281*^9, 3.395425628365217*^9, {3.395425664907221*^9, 3.3954257162011003`*^9}, {3.395425752129518*^9, 3.3954257972082367`*^9}, { 3.395425829948001*^9, 3.3954258311272173`*^9}, {3.395425931925137*^9, 3.395425973905016*^9}, {3.395426019989085*^9, 3.395426025719019*^9}, { 3.395426090408142*^9, 3.395426160080297*^9}, {3.3954261905296907`*^9, 3.395426213718292*^9}, 3.3954262743234797`*^9, 3.395426346186215*^9, { 3.395426386763761*^9, 3.395426511329097*^9}, {3.395426597723218*^9, 3.395426599810129*^9}, {3.395426702979994*^9, 3.395426844608193*^9}, { 3.395426982386313*^9, 3.395426983162035*^9}, {3.395427164443199*^9, 3.3954272269463587`*^9}, {3.395427261828175*^9, 3.395427265783296*^9}, { 3.3954274468796473`*^9, 3.3954275409133787`*^9}, {3.395427584199439*^9, 3.395427587369267*^9}, {3.395427631884698*^9, 3.39542768396945*^9}, { 3.395427749549211*^9, 3.395427782842695*^9}, {3.395427817480939*^9, 3.395427832746813*^9}, 3.395427929635738*^9, {3.395427963024822*^9, 3.395428010391851*^9}, {3.395428134274081*^9, 3.395428134913748*^9}, { 3.395428181608272*^9, 3.395428183550942*^9}, {3.3954282212004623`*^9, 3.395428281798979*^9}, {3.395428400378549*^9, 3.395428446579515*^9}, { 3.3954284803874397`*^9, 3.395428525774808*^9}, 3.39542890754075*^9, { 3.39542894619464*^9, 3.3954289482267733`*^9}, {3.395501278180587*^9, 3.395501302915753*^9}, {3.395501377222764*^9, 3.395501379354026*^9}, 3.39550141791908*^9, 3.468066112329492*^9, {3.4680661434860153`*^9, 3.468066203306775*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`cpts$$ = {{ 1.02, -1.9499999999999997`}, {-0.45999999999999996`, 0.5099999999999998}, {0.96, 3.4700000000000006`}, {3, -4}, {6, 0}, {4, 0}, {6, 4}}, $CellContext`level$$ = 4, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`cpts$$], {{1, 0}, {-1, 0}, {2, 4}, {3, -4}, {6, 0}, { 4, 0}, {6, 4}}}, Automatic}, { Hold[$CellContext`level$$], {0, 1, 2, 3, 4}}}, Typeset`size$$ = { 500., {240., 260.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`level$7098$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`cpts$$ = {{1, 0}, {-1, 0}, {2, 4}, { 3, -4}, {6, 0}, {4, 0}, {6, 4}}, $CellContext`level$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`level$$, $CellContext`level$7098$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`dpts$ = {$CellContext`cpts$$}}, $CellContext`dpts$ = Nest[$CellContext`subd, $CellContext`dpts$, $CellContext`level$$]; Graphics[{{ Thickness[0.004], Line[$CellContext`cpts$$]}, {Blue, Thickness[0.004], Line[$CellContext`dpts$]}}, Axes -> False, ImageSize -> 250, AspectRatio -> Automatic, PlotRange -> {{-2, 8}, {-5, 5}}]], "Specifications" :> {{{$CellContext`cpts$$, {{1, 0}, {-1, 0}, {2, 4}, { 3, -4}, {6, 0}, {4, 0}, {6, 4}}}, Automatic, ControlType -> Locator}, {$CellContext`level$$, {0, 1, 2, 3, 4}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{593., {329.6875, 340.3125}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.468066128013983*^9, {3.46806616081361*^9, 3.468066204525351*^9}}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Lane-Riesenfeld in the Plane", FontColor->RGBColor[0.500008, 0, 0.500008]]], "Section", CellChangeTimes->{{3.392758194656892*^9, 3.392758230699077*^9}, { 3.3927582846772323`*^9, 3.3927583008105917`*^9}, {3.392759535888862*^9, 3.392759536169268*^9}, {3.393948465630563*^9, 3.393948469625586*^9}, { 3.395238143098565*^9, 3.3952381466488533`*^9}, {3.395249963605554*^9, 3.395249965172064*^9}, {3.395400018539534*^9, 3.395400024078085*^9}, { 3.395401053113474*^9, 3.395401085858148*^9}, 3.39540220869522*^9, { 3.395423492735079*^9, 3.395423499498145*^9}}], Cell[CellGroupData[{ Cell["Setup", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.395238896245988*^9, 3.39523889916641*^9}, {3.395238984458644*^9, 3.3952389862597*^9}, {3.395308156744919*^9, 3.395308160533*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{ "split", ",", "average", ",", "averagepts", ",", "subd1", ",", "subd2", ",", "subd3"}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"split", "[", "cpts_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"EvenQ", "[", "i", "]"}], ",", RowBox[{"cpts", "[", RowBox[{"[", RowBox[{"i", "/", "2"}], "]"}], "]"}], " ", ",", RowBox[{"cpts", "[", RowBox[{"[", RowBox[{ RowBox[{"(", RowBox[{"i", "+", "1"}], ")"}], "/", "2"}], "]"}], "]"}]}], "]"}], " ", ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", RowBox[{"2", RowBox[{"Length", "[", "cpts", "]"}]}]}], "}"}]}], "]"}]}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"average", "[", RowBox[{"pt_", ",", "qt_"}], "]"}], ":=", RowBox[{"N", "[", RowBox[{ RowBox[{"(", RowBox[{"pt", "+", "qt"}], ")"}], "/", "2"}], "]"}]}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"averagepts", "[", "pts_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"average", "[", RowBox[{ RowBox[{"pts", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"pts", "[", RowBox[{"[", RowBox[{"k", "+", "1"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{ RowBox[{"Length", "[", "pts", "]"}], "-", "1"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"subd1", "[", "pts_", "]"}], ":=", RowBox[{"averagepts", "[", RowBox[{"split", "[", "pts", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"subd2", "[", "pts_", "]"}], ":=", RowBox[{"averagepts", "[", RowBox[{"averagepts", "[", RowBox[{"split", "[", "pts", "]"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"subd3", "[", "pts_", "]"}], ":=", RowBox[{"averagepts", "[", RowBox[{"averagepts", "[", RowBox[{"averagepts", "[", RowBox[{"split", "[", "pts", "]"}], "]"}], "]"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.393948497697152*^9, 3.393948561850048*^9}, { 3.393948618722395*^9, 3.393948644284052*^9}, {3.3939487536714487`*^9, 3.393948765085331*^9}, {3.393949077334497*^9, 3.393949081615879*^9}, { 3.393949114352923*^9, 3.393949116904583*^9}, {3.3939491479234123`*^9, 3.393949177285159*^9}, {3.39394921210478*^9, 3.3939494045065737`*^9}, 3.393949527438002*^9, 3.393949573733827*^9, {3.393949608294847*^9, 3.393949628878186*^9}, {3.393949670115522*^9, 3.393949670974155*^9}, { 3.395321896487143*^9, 3.395321966149963*^9}, {3.3954300394400673`*^9, 3.395430134075758*^9}, {3.3954305219835663`*^9, 3.395430525248167*^9}, 3.395430821432106*^9, {3.395488895743494*^9, 3.395488997195863*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Linear", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.395238896245988*^9, 3.39523889916641*^9}, {3.395238984458644*^9, 3.3952389862597*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Clear", "[", "cpts", "]"}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"cpts", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "0"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dpts", "=", "cpts"}], ";"}]}], "Input", CellChangeTimes->{{3.393951354939624*^9, 3.393951359872615*^9}, { 3.393951674102435*^9, 3.393951684325902*^9}, {3.395238026982993*^9, 3.395238036432856*^9}, 3.395238074046398*^9, {3.395238225658226*^9, 3.3952384738640423`*^9}, {3.395238531511964*^9, 3.395238580882164*^9}, { 3.395238731013317*^9, 3.395238794276466*^9}, {3.395238874509902*^9, 3.39523887480367*^9}, {3.3952390016552753`*^9, 3.395239002910769*^9}, { 3.395250079959105*^9, 3.3952501023562813`*^9}, 3.3954002080282393`*^9, { 3.395400262261778*^9, 3.395400288405054*^9}, {3.395400414483817*^9, 3.395400414861682*^9}, {3.395400799355679*^9, 3.395400804076928*^9}, { 3.3954235338286123`*^9, 3.395423578230411*^9}, {3.3954245002416143`*^9, 3.395424504074088*^9}, {3.3954306899084263`*^9, 3.3954307039571342`*^9}, 3.3954307343484373`*^9, {3.3954311035341597`*^9, 3.395431128224525*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".006", "]"}], ",", RowBox[{"PointSize", "[", ".02", "]"}], ",", RowBox[{"Point", "[", "dpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "cpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", ".02", "]"}], ",", RowBox[{"Point", "[", "cpts", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}]}], "]"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dpts", "=", RowBox[{"subd1", "[", "dpts", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.393951402119237*^9, 3.393951512579959*^9}, { 3.393951729245154*^9, 3.3939517327934313`*^9}, {3.3939517850582657`*^9, 3.393951811835869*^9}, 3.393951852160274*^9, {3.3952272819448023`*^9, 3.395227288351358*^9}, 3.3952273299587593`*^9, {3.3952274293927298`*^9, 3.395227443631971*^9}, {3.395238555266152*^9, 3.395238566430242*^9}, { 3.395238601254319*^9, 3.395238635024282*^9}, {3.395238693345229*^9, 3.395238698351844*^9}, {3.395238824155143*^9, 3.395238836483555*^9}, { 3.395238992626741*^9, 3.3952389970531683`*^9}, {3.3952501094056597`*^9, 3.3952501199351892`*^9}, 3.3952501533222446`*^9, {3.3952503144816523`*^9, 3.395250367027668*^9}, {3.3952508414363213`*^9, 3.395250847607258*^9}, { 3.395252314044726*^9, 3.3952523191726303`*^9}, {3.395400849295466*^9, 3.395400907920974*^9}, {3.395403666567749*^9, 3.395403670654006*^9}, { 3.395404508822563*^9, 3.3954045380776033`*^9}, {3.395423743690234*^9, 3.3954237507810698`*^9}, {3.395423792300849*^9, 3.395423833048489*^9}, { 3.395424525953763*^9, 3.3954245299542503`*^9}, {3.395430157714876*^9, 3.3954301659950857`*^9}, 3.395430258696129*^9, {3.395430546487446*^9, 3.395430549899149*^9}, {3.3954890194328747`*^9, 3.395489100769684*^9}}], Cell[BoxData[ GraphicsBox[{ {RGBColor[0, 0, 1], PointSize[0.02], Thickness[0.006], PointBox[{{0, 0}, {1, 0}, {2, 1}, {3, 0}, {4, 0}}]}, {Thickness[0.004], LineBox[{{0, 0}, {1, 0}, {2, 1}, {3, 0}, {4, 0}}]}, {PointSize[0.02], PointBox[{{0, 0}, {1, 0}, {2, 1}, {3, 0}, {4, 0}}]}}, AspectRatio->Automatic, Axes->False]], "Output", CellChangeTimes->{{3.395430260975485*^9, 3.3954302645744762`*^9}, { 3.395430559148176*^9, 3.395430562005157*^9}, {3.395489029217692*^9, 3.39548913236607*^9}, {3.395501597908725*^9, 3.395501613950914*^9}, { 3.39558144650961*^9, 3.395581449181178*^9}, 3.468065930630247*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Quadratic", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.395238896245988*^9, 3.39523889916641*^9}, {3.395238984458644*^9, 3.3952389862597*^9}, {3.39540392439797*^9, 3.3954039258105583`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dpts", "=", "cpts"}], "}"}], ",", RowBox[{ RowBox[{"dpts", "=", RowBox[{"Nest", "[", RowBox[{"subd2", ",", "dpts", ",", "level"}], "]"}]}], ";", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "cpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "dpts", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "250"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "4"}], "}"}]}], "}"}]}]}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"cpts", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "0"}], "}"}]}], "}"}]}], "}"}], ",", "Locator"}], "}"}], ",", RowBox[{"{", RowBox[{"level", ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "2", ",", "3", ",", "4"}], "}"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.393589714687162*^9, 3.393589725857065*^9}, { 3.3935897565050707`*^9, 3.3935898092833147`*^9}, {3.393589933171867*^9, 3.3935900235779343`*^9}, {3.3935901275909567`*^9, 3.393590219864011*^9}, { 3.393590272700382*^9, 3.3935903915167017`*^9}, {3.393590527131462*^9, 3.393590585571598*^9}, {3.3935908779403057`*^9, 3.393590892530198*^9}, 3.3935909346500683`*^9, {3.39359101337705*^9, 3.393591020870512*^9}, { 3.3935910844021177`*^9, 3.393591092356909*^9}, {3.3935911323620787`*^9, 3.393591162102852*^9}, {3.3935912271310387`*^9, 3.393591228133822*^9}, { 3.393591344253921*^9, 3.393591404928492*^9}, 3.393591562366597*^9, { 3.3935916397270947`*^9, 3.393591707435124*^9}, {3.393591765347765*^9, 3.393591839722109*^9}, {3.393591996254627*^9, 3.393591998586124*^9}, { 3.3935920435318403`*^9, 3.3935921235118027`*^9}, {3.393592166537344*^9, 3.3935921896911783`*^9}, {3.393592222478014*^9, 3.393592383434339*^9}, { 3.39359911506677*^9, 3.393599142112351*^9}, {3.393599174937352*^9, 3.393599313733667*^9}, {3.3935994357176437`*^9, 3.393599454925482*^9}, 3.393599505121211*^9, {3.393599536516963*^9, 3.393599571441728*^9}, { 3.3935997156516037`*^9, 3.393599719650565*^9}, {3.395425085868277*^9, 3.395425124672393*^9}, {3.395425170259124*^9, 3.3954251990892076`*^9}, { 3.395425232190833*^9, 3.3954252618516397`*^9}, {3.395425353523493*^9, 3.395425357900023*^9}, {3.395425439185224*^9, 3.3954254709084263`*^9}, 3.39542552750281*^9, 3.395425628365217*^9, {3.395425664907221*^9, 3.3954257162011003`*^9}, {3.395425752129518*^9, 3.3954257972082367`*^9}, { 3.395425829948001*^9, 3.3954258311272173`*^9}, {3.395425931925137*^9, 3.395425973905016*^9}, {3.395426019989085*^9, 3.395426025719019*^9}, { 3.395426090408142*^9, 3.395426160080297*^9}, {3.3954261905296907`*^9, 3.395426213718292*^9}, 3.3954262743234797`*^9, 3.395426346186215*^9, { 3.395426386763761*^9, 3.395426511329097*^9}, {3.395426597723218*^9, 3.395426599810129*^9}, {3.395426702979994*^9, 3.395426844608193*^9}, { 3.395426982386313*^9, 3.395426983162035*^9}, {3.395427164443199*^9, 3.3954272269463587`*^9}, {3.395427261828175*^9, 3.395427265783296*^9}, { 3.3954274468796473`*^9, 3.3954275409133787`*^9}, {3.395427584199439*^9, 3.395427587369267*^9}, {3.395427631884698*^9, 3.39542768396945*^9}, { 3.395427749549211*^9, 3.395427782842695*^9}, {3.395427817480939*^9, 3.395427832746813*^9}, 3.395427929635738*^9, {3.395427963024822*^9, 3.395428010391851*^9}, {3.395428134274081*^9, 3.395428134913748*^9}, { 3.395428181608272*^9, 3.395428183550942*^9}, {3.3954282212004623`*^9, 3.395428281798979*^9}, {3.395428400378549*^9, 3.395428446579515*^9}, { 3.3954284803874397`*^9, 3.395428525774808*^9}, 3.39542890754075*^9, { 3.39542894619464*^9, 3.3954289482267733`*^9}, {3.395429550267788*^9, 3.395429560389138*^9}, {3.3954296068010273`*^9, 3.395429660030072*^9}, { 3.395429697367168*^9, 3.395429713752967*^9}, {3.395430325003272*^9, 3.395430346969286*^9}, {3.395430478574198*^9, 3.395430504519678*^9}, { 3.3954891758808603`*^9, 3.3954891837122517`*^9}, 3.3954896430329647`*^9, { 3.3955014839666557`*^9, 3.395501509962901*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`cpts$$ = {{0, 0}, {0.30000000000000027`, 1.5700000000000003`}, {2.045, 1.92}, {3, 0}, {4, 0}}, $CellContext`level$$ = 4, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`cpts$$], {{0, 0}, {1, 0}, {2, 1}, {3, 0}, {4, 0}}}, Automatic}, { Hold[$CellContext`level$$], {0, 1, 2, 3, 4}}}, Typeset`size$$ = { 500., {177., 198.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`level$804$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`cpts$$ = {{0, 0}, {1, 0}, {2, 1}, {3, 0}, { 4, 0}}, $CellContext`level$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`level$$, $CellContext`level$804$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`dpts$ = $CellContext`cpts$$}, $CellContext`dpts$ = Nest[$CellContext`subd2, $CellContext`dpts$, $CellContext`level$$]; Graphics[{{ Thickness[0.004], Line[$CellContext`cpts$$]}, {Blue, Thickness[0.004], Line[$CellContext`dpts$]}}, Axes -> False, ImageSize -> 250, AspectRatio -> Automatic, PlotRange -> {{-2, 6}, {-2, 4}}]], "Specifications" :> {{{$CellContext`cpts$$, {{0, 0}, {1, 0}, {2, 1}, {3, 0}, {4, 0}}}, Automatic, ControlType -> Locator}, {$CellContext`level$$, {0, 1, 2, 3, 4}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{593., {266.6875, 277.3125}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{{3.395429673285717*^9, 3.395429714766724*^9}, 3.395430365504561*^9, 3.39543048015443*^9, 3.395430572434312*^9, 3.3954891948647327`*^9, 3.3954896460226803`*^9, 3.395501511769824*^9, 3.395501573710636*^9, 3.395501626219678*^9, 3.395501659790073*^9, 3.395581464804717*^9, 3.395581494981966*^9, 3.4680659306657963`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Cubic", "Subsubsection", CellChangeTimes->{{3.393952059807534*^9, 3.393952072093915*^9}, { 3.395238896245988*^9, 3.39523889916641*^9}, {3.395238984458644*^9, 3.3952389862597*^9}, {3.39540392439797*^9, 3.3954039258105583`*^9}, { 3.395424627047618*^9, 3.395424628009479*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"dpts", "=", "cpts"}], "}"}], ",", RowBox[{ RowBox[{"dpts", "=", RowBox[{"Nest", "[", RowBox[{"subd3", ",", "dpts", ",", "level"}], "]"}]}], ";", RowBox[{"Graphics", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "cpts", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"Blue", ",", RowBox[{"Thickness", "[", ".004", "]"}], ",", RowBox[{"Line", "[", "dpts", "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"ImageSize", "\[Rule]", "250"}], ",", RowBox[{"AspectRatio", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "6"}], ",", "6"}], "}"}]}], "}"}]}]}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"cpts", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", RowBox[{"-", "4"}]}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "4"}], "}"}]}], "}"}]}], "}"}], ",", "Locator"}], "}"}], ",", RowBox[{"{", RowBox[{"level", ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "2", ",", "3", ",", "4"}], "}"}]}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.393589714687162*^9, 3.393589725857065*^9}, { 3.3935897565050707`*^9, 3.3935898092833147`*^9}, {3.393589933171867*^9, 3.3935900235779343`*^9}, {3.3935901275909567`*^9, 3.393590219864011*^9}, { 3.393590272700382*^9, 3.3935903915167017`*^9}, {3.393590527131462*^9, 3.393590585571598*^9}, {3.3935908779403057`*^9, 3.393590892530198*^9}, 3.3935909346500683`*^9, {3.39359101337705*^9, 3.393591020870512*^9}, { 3.3935910844021177`*^9, 3.393591092356909*^9}, {3.3935911323620787`*^9, 3.393591162102852*^9}, {3.3935912271310387`*^9, 3.393591228133822*^9}, { 3.393591344253921*^9, 3.393591404928492*^9}, 3.393591562366597*^9, { 3.3935916397270947`*^9, 3.393591707435124*^9}, {3.393591765347765*^9, 3.393591839722109*^9}, {3.393591996254627*^9, 3.393591998586124*^9}, { 3.3935920435318403`*^9, 3.3935921235118027`*^9}, {3.393592166537344*^9, 3.3935921896911783`*^9}, {3.393592222478014*^9, 3.393592383434339*^9}, { 3.39359911506677*^9, 3.393599142112351*^9}, {3.393599174937352*^9, 3.393599313733667*^9}, {3.3935994357176437`*^9, 3.393599454925482*^9}, 3.393599505121211*^9, {3.393599536516963*^9, 3.393599571441728*^9}, { 3.3935997156516037`*^9, 3.393599719650565*^9}, {3.395425085868277*^9, 3.395425124672393*^9}, {3.395425170259124*^9, 3.3954251990892076`*^9}, { 3.395425232190833*^9, 3.3954252618516397`*^9}, {3.395425353523493*^9, 3.395425357900023*^9}, {3.395425439185224*^9, 3.3954254709084263`*^9}, 3.39542552750281*^9, 3.395425628365217*^9, {3.395425664907221*^9, 3.3954257162011003`*^9}, {3.395425752129518*^9, 3.3954257972082367`*^9}, { 3.395425829948001*^9, 3.3954258311272173`*^9}, {3.395425931925137*^9, 3.395425973905016*^9}, {3.395426019989085*^9, 3.395426025719019*^9}, { 3.395426090408142*^9, 3.395426160080297*^9}, {3.3954261905296907`*^9, 3.395426213718292*^9}, 3.3954262743234797`*^9, 3.395426346186215*^9, { 3.395426386763761*^9, 3.395426511329097*^9}, {3.395426597723218*^9, 3.395426599810129*^9}, {3.395426702979994*^9, 3.395426844608193*^9}, { 3.395426982386313*^9, 3.395426983162035*^9}, {3.395427164443199*^9, 3.3954272269463587`*^9}, {3.395427261828175*^9, 3.395427265783296*^9}, { 3.3954274468796473`*^9, 3.3954275409133787`*^9}, {3.395427584199439*^9, 3.395427587369267*^9}, {3.395427631884698*^9, 3.39542768396945*^9}, { 3.395427749549211*^9, 3.395427782842695*^9}, {3.395427817480939*^9, 3.395427832746813*^9}, 3.395427929635738*^9, {3.395427963024822*^9, 3.395428010391851*^9}, {3.395428134274081*^9, 3.395428134913748*^9}, { 3.395428181608272*^9, 3.395428183550942*^9}, {3.3954282212004623`*^9, 3.395428281798979*^9}, {3.395428400378549*^9, 3.395428446579515*^9}, { 3.3954284803874397`*^9, 3.395428525774808*^9}, 3.39542890754075*^9, { 3.39542894619464*^9, 3.3954289482267733`*^9}, {3.395429550267788*^9, 3.395429560389138*^9}, {3.3954296068010273`*^9, 3.395429660030072*^9}, { 3.395429697367168*^9, 3.395429713752967*^9}, {3.395430325003272*^9, 3.395430346969286*^9}, {3.395430478574198*^9, 3.395430504519678*^9}, { 3.3954891758808603`*^9, 3.3954891837122517`*^9}, 3.395489324567973*^9, { 3.3954893894036407`*^9, 3.395489440743737*^9}, 3.395489500740727*^9, { 3.395489537678377*^9, 3.39548957135065*^9}, 3.395489687591817*^9, { 3.3955016714812727`*^9, 3.395501681315072*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`cpts$$ = {{1, 0}, {-0.5999999999999999, -0.3700000000000001}, {1.46, 4.67}, { 2.8, -1.3499999999999996`}, {6, 0}, {4, 0}, {6, 4}}, $CellContext`level$$ = 4, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`cpts$$], {{1, 0}, {-1, 0}, {2, 4}, {3, -4}, {6, 0}, { 4, 0}, {6, 4}}}, Automatic}, { Hold[$CellContext`level$$], {0, 1, 2, 3, 4}}}, Typeset`size$$ = { 500., {290., 310.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`level$826$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`cpts$$ = {{1, 0}, {-1, 0}, {2, 4}, { 3, -4}, {6, 0}, {4, 0}, {6, 4}}, $CellContext`level$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`level$$, $CellContext`level$826$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Module[{$CellContext`dpts$ = $CellContext`cpts$$}, $CellContext`dpts$ = Nest[$CellContext`subd3, $CellContext`dpts$, $CellContext`level$$]; Graphics[{{ Thickness[0.004], Line[$CellContext`cpts$$]}, {Blue, Thickness[0.004], Line[$CellContext`dpts$]}}, Axes -> False, ImageSize -> 250, AspectRatio -> Automatic, PlotRange -> {{-2, 8}, {-6, 6}}]], "Specifications" :> {{{$CellContext`cpts$$, {{1, 0}, {-1, 0}, {2, 4}, { 3, -4}, {6, 0}, {4, 0}, {6, 4}}}, Automatic, ControlType -> Locator}, {$CellContext`level$$, {0, 1, 2, 3, 4}}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{593., {379.6875, 390.3125}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.3954893333122253`*^9, 3.395489395505189*^9, {3.395489425887003*^9, 3.39548944386578*^9}, {3.395489556093948*^9, 3.395489573032694*^9}, 3.395489689071117*^9, 3.3955016921266603`*^9, 3.395501730238947*^9, 3.3955815060601*^9, 3.4680659307322063`*^9}] }, Open ]] }, Open ]] }, Open ]] }, AutoGeneratedPackage->None, WindowToolbars->{}, WindowSize->{1024, 720}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, PrintingOptions->{"PrintCellBrackets"->False, "PrintMultipleHorizontalPages"->False, "PrintRegistrationMarks"->True, "PrintingMargins"->{{54, 54}, {72, 72}}}, ShowSelection->True, Magnification->2, FrontEndVersion->"7.0 for Mac OS X x86 (32-bit) (November 11, 2008)", StyleDefinitions->"Classroom.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 306, 4, 100, "Title"], Cell[854, 26, 277, 7, 110, "Subtitle"], Cell[CellGroupData[{ Cell[1156, 37, 516, 7, 102, "Section"], Cell[CellGroupData[{ Cell[1697, 48, 234, 3, 66, "Subsubsection"], Cell[1934, 53, 3935, 110, 715, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[5906, 168, 249, 3, 66, "Subsubsection"], Cell[CellGroupData[{ Cell[6180, 175, 4787, 94, 355, "Input"], Cell[10970, 271, 2390, 45, 763, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[13409, 322, 245, 3, 66, "Subsubsection"], Cell[CellGroupData[{ Cell[13679, 329, 4960, 98, 355, "Input"], Cell[18642, 429, 2532, 49, 663, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[21223, 484, 297, 4, 66, "Subsubsection"], Cell[CellGroupData[{ Cell[21545, 492, 5302, 107, 355, "Input"], Cell[26850, 601, 2532, 49, 763, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[29443, 657, 597, 8, 102, "Section"], Cell[CellGroupData[{ Cell[30065, 669, 234, 3, 66, "Subsubsection"], Cell[30302, 674, 3259, 91, 625, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[33598, 770, 192, 3, 66, "Subsubsection"], Cell[33793, 775, 1528, 34, 235, "Input"], Cell[CellGroupData[{ Cell[35346, 813, 2126, 41, 295, "Input"], Cell[37475, 856, 632, 11, 291, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[38156, 873, 242, 3, 66, "Subsubsection"], Cell[CellGroupData[{ Cell[38423, 880, 5157, 101, 325, "Input"], Cell[43583, 983, 2669, 50, 637, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[46301, 1039, 287, 4, 66, "Subsubsection"], Cell[CellGroupData[{ Cell[46613, 1047, 5496, 109, 325, "Input"], Cell[52112, 1158, 2705, 52, 863, "Output"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)