(* 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[ 37380, 882] NotebookOptionsPosition[ 36183, 844] NotebookOutlinePosition[ 36522, 859] CellTagsIndexPosition[ 36479, 856] WindowFrame->Normal ContainsDynamic->True *) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[{ RowBox[{ RowBox[{"ClearAll", "[", "\"\\"", "]"}], ";"}], "\n", RowBox[{ RowBox[{"Remove", "[", "\"\\"", "]"}], ";"}]}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"X", "[", RowBox[{"u_", ",", " ", "v_"}], "]"}], ":=", RowBox[{"{", RowBox[{"u", ",", " ", "v", ",", " ", RowBox[{ RowBox[{"(", RowBox[{ SuperscriptBox["u", "2"], "-", SuperscriptBox["v", "2"]}], ")"}], "/", "2"}]}], "}"}]}]], "Input", CellChangeTimes->{{3.441842829625*^9, 3.44184286121875*^9}, { 3.441842912890625*^9, 3.441842913171875*^9}, {3.4418444686875*^9, 3.441844494390625*^9}, {3.441844707484375*^9, 3.44184470984375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"X1", "[", RowBox[{"u0_", ",", "v0_"}], "]"}], ":=", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"X", "[", RowBox[{"u", ",", "v"}], "]"}], ",", " ", "u"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"u", "\[Rule]", "u0"}], ",", " ", RowBox[{"v", "\[Rule]", "v0"}]}], "}"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"X2", "[", RowBox[{"u0_", ",", "v0_"}], "]"}], ":=", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"X", "[", RowBox[{"u", ",", "v"}], "]"}], ",", " ", "v"}], "]"}], "/.", RowBox[{"{", RowBox[{ RowBox[{"u", "\[Rule]", "u0"}], ",", " ", RowBox[{"v", "\[Rule]", "v0"}]}], "}"}]}]}]}], "Input", CellChangeTimes->{{3.441844060015625*^9, 3.441844105265625*^9}, { 3.4418447136875*^9, 3.441844722515625*^9}, {3.441845279640625*^9, 3.4418453069375*^9}, {3.4418453524375*^9, 3.441845354359375*^9}, { 3.44184548653125*^9, 3.44184554571875*^9}, {3.441846066953125*^9, 3.441846084859375*^9}, {3.441848474359375*^9, 3.4418484770625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Nvec", "[", RowBox[{"u_", ",", " ", "v_"}], "]"}], ":=", RowBox[{"Normalize", "[", RowBox[{"Cross", "[", RowBox[{ RowBox[{"X1", "[", RowBox[{"u", ",", "v"}], "]"}], ",", " ", RowBox[{"X2", "[", RowBox[{"u", ",", "v"}], "]"}]}], "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.441846831171875*^9, 3.441846878734375*^9}, { 3.441850895578125*^9, 3.44185097015625*^9}, {3.44185100896875*^9, 3.441851020171875*^9}, 3.441852089171875*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"v1", "[", RowBox[{"u_", ",", "v_"}], "]"}], ":=", RowBox[{"Normalize", "[", RowBox[{"X1", "[", RowBox[{"u", ",", "v"}], "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.441848362328125*^9, 3.441848380484375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"v2", "[", RowBox[{"u_", ",", "v_"}], "]"}], ":=", RowBox[{"Cross", "[", RowBox[{ RowBox[{"Nvec", "[", RowBox[{"u", ",", "v"}], "]"}], ",", RowBox[{"v1", "[", RowBox[{"u", ",", "v"}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.441848279015625*^9, 3.4418483263125*^9}, { 3.441848383953125*^9, 3.44184840240625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"DirVec", "[", RowBox[{"u_", ",", "v_", ",", " ", "\[Theta]_"}], "]"}], ":=", " ", RowBox[{ RowBox[{ RowBox[{"v1", "[", RowBox[{"u", ",", "v"}], "]"}], RowBox[{"Cos", "[", "\[Theta]", "]"}]}], "+", RowBox[{ RowBox[{"v2", "[", RowBox[{"u", ",", "v"}], "]"}], RowBox[{"Sin", "[", "\[Theta]", "]"}]}]}]}], ";"}]], "Input", CellChangeTimes->{{3.44184783621875*^9, 3.44184787759375*^9}, { 3.441848340015625*^9, 3.4418483455*^9}, {3.441848410828125*^9, 3.441848438734375*^9}, 3.441851231265625*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"BinVec", "[", RowBox[{"u_", ",", "v_", ",", "\[Theta]_"}], "]"}], ":=", RowBox[{"DirVec", "[", RowBox[{"u", ",", "v", ",", " ", RowBox[{"\[Theta]", " ", "-", " ", RowBox[{"\[Pi]", "/", "2"}]}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.441867213203125*^9, 3.44186724859375*^9}, { 3.441953935515625*^9, 3.441953935578125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"NIntPlane", "[", RowBox[{"u_", ",", " ", "v_", ",", " ", "\[Theta]"}], "]"}], ":=", RowBox[{"Cross", "[", RowBox[{ RowBox[{"Normalize", "[", RowBox[{"DirVec", "[", RowBox[{"u", ",", " ", "v", ",", " ", "\[Theta]"}], "]"}], "]"}], ",", " ", RowBox[{"Nvec", "[", RowBox[{"u", ",", " ", "v"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.441857932546875*^9, 3.4418580643125*^9}, { 3.4418671995625*^9, 3.441867210390625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"w1", "[", RowBox[{"x0_", ",", " ", "y0_", ",", "\[Theta]0_"}], "]"}], ":=", " ", RowBox[{"Evaluate", "[", RowBox[{"DirVec", "[", RowBox[{"x0", ",", " ", "y0", ",", "\[Theta]0"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"w2", "[", RowBox[{"x0_", ",", " ", "y0_"}], "]"}], ":=", " ", RowBox[{"Evaluate", "[", RowBox[{"Nvec", "[", RowBox[{"x0", ",", "y0"}], "]"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.441846702546875*^9, 3.4418467029375*^9}, 3.441846797375*^9, {3.441848536921875*^9, 3.441848538390625*^9}, { 3.441848615671875*^9, 3.441848636078125*^9}, {3.441849076234375*^9, 3.44184910521875*^9}, {3.441849149046875*^9, 3.441849176734375*^9}, { 3.441849228953125*^9, 3.441849247046875*^9}, 3.441849282640625*^9, 3.441849363734375*^9, {3.441849430796875*^9, 3.441849433984375*^9}, { 3.441849991203125*^9, 3.441849992203125*^9}, {3.441850042265625*^9, 3.44185010071875*^9}, 3.44185013215625*^9, {3.44185041765625*^9, 3.441850423703125*^9}, {3.4418506163125*^9, 3.441850638578125*^9}, { 3.44185072615625*^9, 3.441850757125*^9}, {3.441850795203125*^9, 3.441850814140625*^9}, {3.4418508523125*^9, 3.441850876515625*^9}, { 3.44185091015625*^9, 3.441850982453125*^9}, {3.441851040375*^9, 3.4418510990625*^9}, 3.44185117521875*^9, {3.4418516901875*^9, 3.4418517394375*^9}, {3.44185209509375*^9, 3.441852096203125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Plane", "[", RowBox[{ "u_", ",", " ", "v_", ",", " ", "x0_", ",", " ", "y0_", ",", " ", "\[Theta]_"}], "]"}], ":=", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", " ", RowBox[{"u", " ", RowBox[{"w1", "[", RowBox[{"x0", ",", " ", "y0", ",", "\[Theta]"}], "]"}]}], "+", RowBox[{"v", " ", RowBox[{"w2", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}]}]}], ";"}]], "Input", CellChangeTimes->{{3.4418430281875*^9, 3.441843036625*^9}, { 3.441843144578125*^9, 3.441843199921875*^9}, {3.44184330565625*^9, 3.44184331059375*^9}, {3.4418434426875*^9, 3.44184353996875*^9}, { 3.44184469790625*^9, 3.44184470046875*^9}, 3.441844732421875*^9, { 3.441844765359375*^9, 3.441844836765625*^9}, 3.441844888375*^9, { 3.441845157796875*^9, 3.441845161640625*^9}, {3.44184521396875*^9, 3.44184524803125*^9}, {3.441845311265625*^9, 3.441845315921875*^9}, { 3.44184594753125*^9, 3.441845956375*^9}, {3.441846455125*^9, 3.441846494171875*^9}, {3.441846555109375*^9, 3.441846580640625*^9}, { 3.4418466438125*^9, 3.44184667165625*^9}, {3.4418479406875*^9, 3.441847943546875*^9}, {3.441848523640625*^9, 3.44184861109375*^9}, { 3.44184864878125*^9, 3.44184865353125*^9}, {3.441848995078125*^9, 3.441849020109375*^9}, {3.441849062390625*^9, 3.441849068671875*^9}, { 3.441849219734375*^9, 3.441849221375*^9}, {3.441849293140625*^9, 3.441849300390625*^9}, {3.4418493326875*^9, 3.441849355203125*^9}, { 3.441849781453125*^9, 3.4418497845*^9}, {3.441849998828125*^9, 3.441850032984375*^9}, {3.441850558015625*^9, 3.44185056515625*^9}, { 3.441850646140625*^9, 3.4418506826875*^9}, {3.441851106109375*^9, 3.441851107421875*^9}, {3.441851143328125*^9, 3.44185114871875*^9}, { 3.441851295265625*^9, 3.4418513180625*^9}, {3.441851585515625*^9, 3.441851592765625*^9}, {3.441851628609375*^9, 3.44185164259375*^9}, { 3.441851737125*^9, 3.4418517841875*^9}, {3.4418519259375*^9, 3.44185198165625*^9}, {3.4418520218125*^9, 3.441852032421875*^9}, { 3.441852105171875*^9, 3.441852117015625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"bb", "[", RowBox[{"t_", ",", " ", "x_", ",", " ", "y_", ",", " ", "\[Theta]2_"}], "]"}], ":=", RowBox[{ RowBox[{"b", "/.", RowBox[{ RowBox[{"NSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", RowBox[{"t0", "*", RowBox[{"w1", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], " ", "+", " ", RowBox[{"b", "*", RowBox[{"w2", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}]}], "\[Equal]", RowBox[{"X", "[", RowBox[{ RowBox[{"x0", "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"t0", "*", RowBox[{"w1", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], " ", "+", " ", RowBox[{"b", "*", RowBox[{"w2", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}]}], ")"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", " ", RowBox[{"y0", "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"t0", "*", RowBox[{"w1", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], " ", "+", " ", RowBox[{"b", "*", RowBox[{"w2", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}]}], ")"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}]}], ",", "b"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "/.", RowBox[{"{", RowBox[{ RowBox[{"x0", "\[Rule]", "x"}], ",", " ", RowBox[{"y0", "\[Rule]", "y"}], ",", " ", RowBox[{"\[Theta]", "\[Rule]", "\[Theta]2"}], ",", " ", RowBox[{"t0", "\[Rule]", "t"}]}], "}"}]}]}]], "Input", CellChangeTimes->{{3.4418619895*^9, 3.441861994859375*^9}, { 3.442246646078125*^9, 3.442246649078125*^9}, {3.44224671946875*^9, 3.44224672071875*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"\[Alpha]", "[", RowBox[{"t_", ",", " ", "x0_", ",", " ", "y0_", ",", " ", "\[Theta]_"}], "]"}], ":=", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", RowBox[{"t", "*", RowBox[{"w1", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], " ", "+", " ", RowBox[{ RowBox[{"bb", "[", RowBox[{"t", ",", " ", "x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}], " ", "*", RowBox[{"w2", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}]}]}]], "Input", CellChangeTimes->{{3.441853222953125*^9, 3.44185323134375*^9}, { 3.441854069421875*^9, 3.4418540704375*^9}, {3.44185444596875*^9, 3.441854460234375*^9}, {3.4418545638125*^9, 3.44185457653125*^9}, { 3.441854632765625*^9, 3.441854648328125*^9}, 3.441855019890625*^9, { 3.44185507359375*^9, 3.441855146234375*^9}, {3.441855189265625*^9, 3.4418553164375*^9}, {3.441856088953125*^9, 3.4418561008125*^9}, { 3.4418608325*^9, 3.441860858609375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"K", ":=", RowBox[{"Abs", "[", FractionBox[ RowBox[{ RowBox[{"bInterp", "''"}], "[", "0", "]"}], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "+", RowBox[{ RowBox[{ RowBox[{"bInterp", "'"}], "[", "0", "]"}], "^", "2"}]}], ")"}], RowBox[{"3", "/", "2"}]]], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.441837079734375*^9, 3.441837119515625*^9}, { 3.44183716771875*^9, 3.44183717225*^9}, {3.44183723078125*^9, 3.4418372835625*^9}, 3.441837701703125*^9, {3.441837892484375*^9, 3.441837893609375*^9}, {3.441867852796875*^9, 3.44186786096875*^9}, { 3.441868065765625*^9, 3.441868082234375*^9}, {3.44186820140625*^9, 3.441868260953125*^9}, {3.44186956915625*^9, 3.441869594171875*^9}, { 3.441870029140625*^9, 3.44187004178125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"OscCenter", " ", ":=", " ", RowBox[{ RowBox[{"\[Alpha]Interp", "[", "0", "]"}], " ", "+", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Re", "[", RowBox[{ RowBox[{ RowBox[{"\[Alpha]Interp", "''"}], "[", "0", "]"}], ".", "NvecOld"}], "]"}], " ", "\[GreaterEqual]", " ", "0"}], ",", " ", RowBox[{"NvecOld", "/", "K"}], ",", " ", RowBox[{ RowBox[{"-", "NvecOld"}], "/", "K"}]}], "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.44186788921875*^9, 3.441867915703125*^9}, { 3.441868276796875*^9, 3.441868288359375*^9}, {3.44186853084375*^9, 3.4418685313125*^9}, {3.44186910390625*^9, 3.4418691045*^9}, { 3.441870053375*^9, 3.441870065734375*^9}, {3.44187028296875*^9, 3.4418704166875*^9}, {3.44187045159375*^9, 3.441870454890625*^9}, { 3.4418705385*^9, 3.441870556984375*^9}, {3.441870621796875*^9, 3.44187063075*^9}, {3.44187082171875*^9, 3.44187082284375*^9}, 3.441872558703125*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"OscCircle", "[", "t_", "]"}], ":=", RowBox[{"OscCenter", "+", RowBox[{ RowBox[{"Cos", "[", "t", "]"}], RowBox[{"NvecOld", "/", "K"}]}], " ", "+", RowBox[{ RowBox[{"Sin", "[", "t", "]"}], " ", RowBox[{"DirVecOld", "/", "K"}]}]}]}], ";"}]], "Input", CellChangeTimes->{{3.44186841725*^9, 3.441868554125*^9}, { 3.44186860809375*^9, 3.441868718421875*^9}, {3.441868787515625*^9, 3.44186881203125*^9}, {3.44186897271875*^9, 3.441868973234375*^9}, { 3.441869209296875*^9, 3.441869221171875*^9}, {3.441869358078125*^9, 3.441869404625*^9}, {3.4418695075625*^9, 3.441869515234375*^9}, { 3.441869811671875*^9, 3.441869818390625*^9}, {3.441869869796875*^9, 3.441869872609375*^9}, {3.4418700805*^9, 3.44187010240625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"ReinterpolateCurve", "[", RowBox[{"x0_", ",", " ", "y0_", ",", " ", "\[Theta]_"}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"pts", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"t", ",", RowBox[{"bb", "[", RowBox[{"t", ",", " ", "x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"t", ",", " ", RowBox[{"-", "10"}], ",", " ", "10", ",", " ", ".5"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"bInterp", "=", RowBox[{"Interpolation", "[", "pts", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Alpha]Interp", "[", "t_", "]"}], " ", ":=", " ", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", RowBox[{"t", "*", RowBox[{"w1", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], " ", "+", " ", RowBox[{ RowBox[{"bInterp", "[", "t", "]"}], " ", "*", RowBox[{"w2", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"NvecOld", " ", "=", " ", RowBox[{"Nvec", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"DirVecOld", " ", "=", " ", RowBox[{"DirVec", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"\[Theta]Old", "=", "\[Theta]"}], ";", "\[IndentingNewLine]", RowBox[{"OscCenterOld", " ", "=", " ", RowBox[{"Evaluate", "[", RowBox[{"OscCenter", "[", "t", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"KOld", "=", RowBox[{"Evaluate", "[", RowBox[{"K", "[", "t", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", "}"}]}]], "Input", CellChangeTimes->{{3.441861074984375*^9, 3.44186109690625*^9}, { 3.44186120621875*^9, 3.4418612706875*^9}, {3.4418622296875*^9, 3.441862229796875*^9}, {3.441862260140625*^9, 3.44186226275*^9}, { 3.44186250446875*^9, 3.441862580640625*^9}, {3.441862639953125*^9, 3.441862780890625*^9}, {3.4418628286875*^9, 3.441862873171875*^9}, { 3.441862929203125*^9, 3.44186292978125*^9}, {3.441863011953125*^9, 3.4418630731875*^9}, {3.441863415625*^9, 3.44186342853125*^9}, { 3.441863662484375*^9, 3.441863663875*^9}, {3.441863765328125*^9, 3.441863781859375*^9}, {3.44186393784375*^9, 3.441863943921875*^9}, { 3.441863988953125*^9, 3.441863989296875*^9}, {3.441868819046875*^9, 3.44186885675*^9}, {3.441869227515625*^9, 3.441869233546875*^9}, { 3.441869327859375*^9, 3.441869380625*^9}, {3.441869764359375*^9, 3.441869767640625*^9}, {3.441869851875*^9, 3.44186985721875*^9}, { 3.441871268265625*^9, 3.441871269296875*^9}, {3.44187143421875*^9, 3.44187143559375*^9}, {3.4431974438604116`*^9, 3.4431974510168447`*^9}, { 3.44319749733053*^9, 3.4431976072552195`*^9}, {3.443197648646904*^9, 3.4431976531626444`*^9}, 3.443197786042225*^9, {3.4431979241271267`*^9, 3.4431979264435697`*^9}, 3.4431980443698587`*^9, {3.4431980801110773`*^9, 3.443198081233838*^9}, {3.4431981544783864`*^9, 3.4431982411180944`*^9}, { 3.4431986236130805`*^9, 3.4431986269850564`*^9}, {3.443198713658725*^9, 3.443198715626492*^9}}], Cell[BoxData[ RowBox[{"(*", RowBox[{"ReinterpolateCurve", "[", RowBox[{"1", ",", " ", "0", ",", "0"}], "]"}], "*)"}]], "Input", CellChangeTimes->{{3.443198969582922*^9, 3.4431989731128836`*^9}, { 3.4431995467656755`*^9, 3.443199548327716*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"x0Old", ",", " ", "y0Old", ",", "\[Theta]0Old"}], "}"}], " ", "=", " ", RowBox[{"{", RowBox[{"0", ",", " ", "1", ",", " ", "0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ReinterpolateCurve", "[", RowBox[{"x0Old", ",", " ", "y0Old", ",", "\[Theta]0Old"}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.443199614245804*^9, 3.4431996220560036`*^9}, { 3.4431997721368065`*^9, 3.4431997743236628`*^9}, {3.443199819076109*^9, 3.4431998191385903`*^9}, {3.443199891836321*^9, 3.443199893429612*^9}, 3.443200019799457*^9, 3.443200181440714*^9}], Cell[BoxData[ RowBox[{ RowBox[{"AssignOldValus", " ", "[", RowBox[{"x0_", ",", " ", "y0_", ",", " ", "\[Theta]_"}], "]"}], ":=", " ", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"x0Old", " ", "=", " ", "x0"}], ";", "\[IndentingNewLine]", RowBox[{"y0Old", " ", "=", " ", "y0"}], ";", "\[IndentingNewLine]", RowBox[{"\[Theta]0Old", " ", "=", " ", "\[Theta]"}], ";"}], "\[IndentingNewLine]", "}"}]}]], "Input", CellChangeTimes->{{3.441863085984375*^9, 3.4418631448125*^9}, { 3.4431973907340517`*^9, 3.4431974156721897`*^9}, {3.443198036136279*^9, 3.443198039878815*^9}, {3.4431983847335587`*^9, 3.4431983950368185`*^9}, { 3.443198722935342*^9, 3.443198798366418*^9}, {3.443198955103831*^9, 3.4431989563846135`*^9}, 3.4431995660568695`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Show", "[", RowBox[{"{", "\[IndentingNewLine]", "\t", RowBox[{ RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"{", RowBox[{"Plane", "[", RowBox[{ "u", ",", " ", "v", ",", " ", "x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"u", ",", " ", RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"v", ",", RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", "\[IndentingNewLine]", "\t\t\t\t\t", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}]}], "}"}]}], " ", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Opacity", "[", ".1", "]"}]}], ",", RowBox[{"Mesh", "\[Rule]", "None"}], ",", " ", RowBox[{"BoxRatios", "\[Rule]", "Automatic"}]}], "]"}], ",", "\[IndentingNewLine]", "\t", RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"{", RowBox[{"X", "[", RowBox[{"u", ",", "v"}], "]"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"u", ",", " ", RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"v", ",", RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", "\[IndentingNewLine]", "\t\t\t\t\t", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}]}], "}"}]}], " ", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"Opacity", "[", ".4", "]"}]}], ",", RowBox[{"Mesh", "\[Rule]", "None"}], ",", " ", RowBox[{"BoxRatios", "\[Rule]", "Automatic"}]}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"\[Alpha]Interp", "[", "t", "]"}], ",", " ", RowBox[{"{", RowBox[{"t", ",", " ", RowBox[{"-", "10"}], ",", " ", "10"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"-", "4"}], ",", " ", "4"}], "}"}]}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Directive", "[", RowBox[{"Red", ",", " ", "Thick"}], "]"}], "}"}]}]}], "]"}], ",", " ", "\[IndentingNewLine]", "\t", RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"OscCircle", "[", "t", "]"}], ",", " ", RowBox[{"{", RowBox[{"t", ",", " ", "0", ",", " ", RowBox[{"2", "\[Pi]"}]}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"Directive", "[", RowBox[{"Blue", ",", " ", "Thick"}], "]"}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", "\t", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", ".02", "]"}], ",", " ", "Blue", ",", " ", RowBox[{"Point", "[", RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "]"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", "\t", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{"Thick", ",", " ", "Green", ",", " ", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], ",", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", RowBox[{"Nvec", "[", RowBox[{"x0", ",", "y0"}], "]"}]}]}], "}"}], "]"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", " ", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{"Thick", ",", " ", "Purple", ",", RowBox[{"Line", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], ",", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", RowBox[{"DirVec", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}]}], "}"}], "]"}]}], "}"}], "]"}], ",", " ", "\[IndentingNewLine]", " ", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{"Thick", ",", " ", "Cyan", ",", " ", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], ",", " ", RowBox[{ RowBox[{"X", "[", RowBox[{"x0", ",", " ", "y0"}], "]"}], "+", RowBox[{"BinVec", "[", RowBox[{"x0", ",", " ", "y0", ",", "\[Theta]"}], "]"}]}]}], "}"}], "]"}]}], "}"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AssignOldValus", "[", RowBox[{"x0", ",", " ", "y0", ",", " ", "\[Theta]"}], "]"}]}], "\[IndentingNewLine]", "}"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x0", ",", "x0Old"}], "}"}], ",", " ", RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"y0", ",", "y0Old"}], "}"}], ",", " ", RowBox[{"-", "4"}], ",", " ", "4"}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Theta]", ",", "\[Theta]0Old"}], "}"}], ",", " ", "0", ",", " ", RowBox[{"2", "\[Pi]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.441861372546875*^9, 3.441861391125*^9}, { 3.441861481125*^9, 3.4418614898125*^9}, {3.44186168059375*^9, 3.441861684859375*^9}, {3.441861744671875*^9, 3.441861748640625*^9}, { 3.441862150453125*^9, 3.441862165203125*^9}, {3.441862347484375*^9, 3.44186245109375*^9}, {3.441863160859375*^9, 3.4418631986875*^9}, { 3.4418632315625*^9, 3.4418632705625*^9}, {3.441864049*^9, 3.44186405084375*^9}, {3.441864099609375*^9, 3.44186410215625*^9}, { 3.441864338125*^9, 3.441864378109375*^9}, {3.44186453321875*^9, 3.44186455821875*^9}, {3.441864932859375*^9, 3.44186514659375*^9}, { 3.441865248765625*^9, 3.441865250890625*^9}, {3.44186533925*^9, 3.441865346953125*^9}, {3.44186563921875*^9, 3.441865640453125*^9}, { 3.44186571628125*^9, 3.441865716359375*^9}, {3.441865819859375*^9, 3.441865843734375*^9}, {3.441865877671875*^9, 3.441865881671875*^9}, { 3.441866244546875*^9, 3.44186624690625*^9}, {3.44186635321875*^9, 3.441866417796875*^9}, {3.441866548734375*^9, 3.441866550546875*^9}, { 3.441866642125*^9, 3.4418666439375*^9}, {3.441866916515625*^9, 3.441866920515625*^9}, {3.441867033265625*^9, 3.44186703896875*^9}, { 3.441867264015625*^9, 3.44186728190625*^9}, {3.441867414859375*^9, 3.441867615734375*^9}, {3.441868912328125*^9, 3.44186899290625*^9}, 3.4418711321875*^9, {3.441871211359375*^9, 3.44187121175*^9}, { 3.44187124809375*^9, 3.441871251515625*^9}, {3.441871426625*^9, 3.441871427890625*^9}, {3.441871527125*^9, 3.4418715505625*^9}, { 3.44187158246875*^9, 3.44187161996875*^9}, {3.44187168875*^9, 3.44187176934375*^9}, {3.441871860859375*^9, 3.44187186275*^9}, { 3.441871922125*^9, 3.441871945015625*^9}, {3.44187203296875*^9, 3.441872060890625*^9}, {3.441872129*^9, 3.441872174734375*^9}, { 3.441872318796875*^9, 3.44187232134375*^9}, {3.441872351671875*^9, 3.4418723710625*^9}, {3.441872479953125*^9, 3.441872516328125*^9}, { 3.44187260365625*^9, 3.44187260428125*^9}, {3.441872671125*^9, 3.44187267803125*^9}, {3.441872724375*^9, 3.441872750625*^9}, { 3.441872901671875*^9, 3.441872905828125*^9}, {3.442246515703125*^9, 3.442246528515625*^9}, 3.44224656228125*^9, {3.44319207784375*^9, 3.443192080234375*^9}, {3.443197969258906*^9, 3.443197977265405*^9}, 3.4431983474232683`*^9, {3.4431984452105722`*^9, 3.4431984501904817`*^9}, { 3.4431985524269204`*^9, 3.4431985859125156`*^9}, {3.4431990895703845`*^9, 3.4431991457998643`*^9}, {3.443199189502666*^9, 3.443199205496829*^9}, { 3.443199283846269*^9, 3.443199336095838*^9}, {3.4431994168835125`*^9, 3.4431995134944496`*^9}, {3.4431997391621428`*^9, 3.4431998121250305`*^9}}],\ Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`x0$$ = -0.2999999999999998, \ $CellContext`y0$$ = -0.5499999999999998, $CellContext`\[Theta]$$ = 0.5403539364174444, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`x0$$], 0}, -4, 4}, {{ Hold[$CellContext`y0$$], 1}, -4, 4}, {{ Hold[$CellContext`\[Theta]$$], 0}, 0, 2 Pi}}, Typeset`size$$ = { 360., {205., 209.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`x0$5197$$ = 0, $CellContext`y0$5198$$ = 0, $CellContext`\[Theta]$5199$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`x0$$ = 0, $CellContext`y0$$ = 1, $CellContext`\[Theta]$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`x0$$, $CellContext`x0$5197$$, 0], Hold[$CellContext`y0$$, $CellContext`y0$5198$$, 0], Hold[$CellContext`\[Theta]$$, $CellContext`\[Theta]$5199$$, 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" :> Part[{ Show[{ ParametricPlot3D[{ $CellContext`Plane[$CellContext`u, $CellContext`v, \ $CellContext`x0$$, $CellContext`y0$$, $CellContext`\[Theta]$$]}, \ {$CellContext`u, -4, 4}, {$CellContext`v, -4, 4}, PlotRange -> {{-4, 4}, {-4, 4}, {-4, 4}}, PlotStyle -> Opacity[0.1], Mesh -> None, BoxRatios -> Automatic], ParametricPlot3D[{ $CellContext`X[$CellContext`u, $CellContext`v]}, \ {$CellContext`u, -4, 4}, {$CellContext`v, -4, 4}, PlotRange -> {{-4, 4}, {-4, 4}, {-4, 4}}, PlotStyle -> Opacity[0.4], Mesh -> None, BoxRatios -> Automatic], ParametricPlot3D[ $CellContext`\[Alpha]Interp[$CellContext`t], {$CellContext`t, -10, 10}, PlotRange -> {{-4, 4}, {-4, 4}, {-4, 4}}, PlotStyle -> { Directive[Red, Thick]}], ParametricPlot3D[ $CellContext`OscCircle[$CellContext`t], {$CellContext`t, 0, 2 Pi}, PlotStyle -> { Directive[Blue, Thick]}], Graphics3D[{ PointSize[0.02], Blue, Point[ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$]]}], Graphics3D[{Thick, Green, Line[{ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$], \ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$] + \ $CellContext`Nvec[$CellContext`x0$$, $CellContext`y0$$]}]}], Graphics3D[{Thick, Purple, Line[{ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$], \ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$] + \ $CellContext`DirVec[$CellContext`x0$$, $CellContext`y0$$, $CellContext`\ \[Theta]$$]}]}], Graphics3D[{Thick, Cyan, Line[{ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$], \ $CellContext`X[$CellContext`x0$$, $CellContext`y0$$] + \ $CellContext`BinVec[$CellContext`x0$$, $CellContext`y0$$, $CellContext`\ \[Theta]$$]}]}]}], $CellContext`AssignOldValus[$CellContext`x0$$, $CellContext`y0$$, \ $CellContext`\[Theta]$$]}, 1], "Specifications" :> {{{$CellContext`x0$$, 0}, -4, 4}, {{$CellContext`y0$$, 1}, -4, 4}, {{$CellContext`\[Theta]$$, 0}, 0, 2 Pi}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{406., {275., 280.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.44187251803125*^9, 3.4418726063125*^9, 3.441872679234375*^9, { 3.441872731671875*^9, 3.441872751359375*^9}, 3.441872906625*^9, 3.441929462296875*^9, 3.441953818578125*^9, 3.4419539984375*^9, 3.44224262353125*^9, 3.442246048921875*^9, 3.442246563453125*^9, 3.442247175453125*^9, 3.442247251421875*^9, 3.44224732896875*^9, 3.442458010265625*^9, 3.443192043390625*^9, 3.443192109703125*^9, { 3.4431972596681967`*^9, 3.4431972945909653`*^9}, 3.443197346295414*^9, 3.443197978120468*^9, 3.4431982956031814`*^9, 3.4431983491873116`*^9, 3.44319845282874*^9, {3.4431985540036316`*^9, 3.4431985867867317`*^9}, { 3.443199131195819*^9, 3.443199192845196*^9}, {3.4431993065267997`*^9, 3.4431993371580114`*^9}, {3.443199419960692*^9, 3.443199452685011*^9}, { 3.443199483784829*^9, 3.4431995143535604`*^9}, 3.44319957974034*^9, 3.4431996260235853`*^9, 3.44319976288953*^9, {3.443199813359042*^9, 3.4431998217940583`*^9}, 3.4431999280290194`*^9, 3.443200034451486*^9, 3.4432001959210105`*^9, 3.4432017155242195`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"ReinterpolateCurve", "[", RowBox[{"x0Old", ",", " ", "y0Old", ",", "\[Theta]0Old"}], "]"}], ";"}]], "Input", CellChangeTimes->{{3.443199350044677*^9, 3.443199367008214*^9}, 3.443200023517136*^9}], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ "Manipulate", " ", "sliders", " ", "to", " ", "position", " ", "the", " ", "blue", " ", "point", " ", "on", " ", "the", " ", RowBox[{"surface", ".", " ", "Then"}], " ", "Evaluate", " ", "the", " ", "above", " ", "line", " ", "\"\\"", " ", "to", " ", "compute", " ", "the", " ", "normal", " ", "curve", " ", "in", " ", "the", " ", "tangent", " ", "direction", " ", "as", " ", "well", " ", "as", " ", "the", " ", "osculating", " ", RowBox[{"circle", "."}]}], " ", "*)"}]], "Input", CellChangeTimes->{{3.4432002836775413`*^9, 3.4432003627333975`*^9}}] }, WindowSize->{827, 730}, WindowMargins->{{0, Automatic}, {Automatic, 4}}, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[568, 21, 172, 4, 52, "Input"], Cell[743, 27, 515, 13, 33, "Input"], Cell[1261, 42, 1083, 29, 52, "Input"], Cell[2347, 73, 542, 14, 31, "Input"], Cell[2892, 89, 285, 8, 31, "Input"], Cell[3180, 99, 415, 12, 31, "Input"], Cell[3598, 113, 600, 16, 31, "Input"], Cell[4201, 131, 409, 10, 31, "Input"], Cell[4613, 143, 586, 16, 52, "Input"], Cell[5202, 161, 1499, 29, 52, "Input"], Cell[6704, 192, 2163, 39, 31, "Input"], Cell[8870, 233, 2104, 57, 112, "Input"], Cell[10977, 292, 1042, 24, 31, "Input"], Cell[12022, 318, 855, 20, 48, "Input"], Cell[12880, 340, 1035, 23, 31, "Input"], Cell[13918, 365, 807, 17, 31, "Input"], Cell[14728, 384, 3429, 72, 232, "Input"], Cell[18160, 458, 254, 5, 31, "Input"], Cell[18417, 465, 657, 16, 52, "Input"], Cell[19077, 483, 818, 15, 132, "Input"], Cell[CellGroupData[{ Cell[19920, 502, 10129, 217, 412, "Input"], Cell[30054, 722, 5185, 97, 572, "Output"] }, Open ]], Cell[35254, 822, 242, 6, 31, "Input"], Cell[35499, 830, 680, 12, 72, "Input"] } ] *) (* End of internal cache information *)