(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 7894, 161] NotebookOptionsPosition[ 7460, 145] NotebookOutlinePosition[ 7806, 160] CellTagsIndexPosition[ 7763, 157] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Distance from a point to the oval in the plane", "Subsubsection", CellChangeTimes->{{3.6799959272424545`*^9, 3.6799959714925165`*^9}, { 3.680187880725844*^9, 3.6801878813658447`*^9}, {3.6801879133558893`*^9, 3.6801879169258947`*^9}, {3.680188161286237*^9, 3.6801881618662376`*^9}, { 3.680188252966365*^9, 3.6801882616863775`*^9}, {3.6801883076464415`*^9, 3.680188367706526*^9}, {3.68018854232677*^9, 3.680188555186788*^9}, { 3.680188645956915*^9, 3.6801887056379986`*^9}, {3.6801889273883095`*^9, 3.680188930058313*^9}, {3.680189244018752*^9, 3.6801892847288094`*^9}, { 3.6801893580589123`*^9, 3.680189359168914*^9}, {3.680189420118999*^9, 3.6801894397690268`*^9}, {3.6801894730990734`*^9, 3.6801895437291718`*^9}, {3.6801900734149265`*^9, 3.680190086304945*^9}, { 3.6801901868050857`*^9, 3.6801903182252693`*^9}, {3.6801903981653814`*^9, 3.6801904303854265`*^9}, {3.680190477125492*^9, 3.6801906342057123`*^9}, { 3.680190665865756*^9, 3.6801906674757586`*^9}, {3.680191007020167*^9, 3.680191145620361*^9}, {3.680191176980405*^9, 3.6801912085004487`*^9}, { 3.680191325810613*^9, 3.680191412160734*^9}, {3.680191481260831*^9, 3.6801914918608456`*^9}, {3.6801915407409143`*^9, 3.6801916609210825`*^9}, {3.680191718901163*^9, 3.680191724661172*^9}, { 3.680191798661275*^9, 3.6801918474213433`*^9}, {3.6801920336116037`*^9, 3.680192064282647*^9}, {3.680192966581046*^9, 3.680193025731129*^9}, { 3.680193071341193*^9, 3.680193073591196*^9}, {3.6801931694413304`*^9, 3.6801931716413336`*^9}, {3.680193204341379*^9, 3.680193221921404*^9}, { 3.6801932521514463`*^9, 3.680193327011551*^9}, {3.6801934502717237`*^9, 3.680193456331732*^9}, {3.6801935486538625`*^9, 3.68019367538404*^9}, { 3.6802229763031774`*^9, 3.6802230363632617`*^9}, {3.6802233314036746`*^9, 3.680223369553728*^9}, {3.6802234540458508`*^9, 3.6802234659658675`*^9}, { 3.680223573446018*^9, 3.6802236119760723`*^9}, 3.6802245810804358`*^9, { 3.680224788350726*^9, 3.680224788880727*^9}, {3.68022576742412*^9, 3.68022578184414*^9}, 3.680225916668332*^9, {3.6802259495283785`*^9, 3.680225953498384*^9}, {3.680226611300305*^9, 3.6802266283203287`*^9}, 3.6807540138389945`*^9, {3.81062018635697*^9, 3.8106202074909267`*^9}, { 3.822484603369218*^9, 3.822484608577613*^9}, {3.8224849939393234`*^9, 3.8224849948861876`*^9}},ExpressionUUID->"99b3be41-1c7d-4efb-9c0f-\ b7e6646fae69"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"Input", ":", " ", RowBox[{ RowBox[{"point", " ", "T"}], " ", "\[Element]", " ", SuperscriptBox["\[DoubleStruckCapitalR]", "2"]}]}], ",", " ", RowBox[{"segment", " ", "[", RowBox[{"\[Mu]", ",", "\[Nu]"}], "]"}], ",", " ", RowBox[{ RowBox[{"radius", " ", StyleBox["r", FontSlant->"Italic"]}], ";", " ", "\[IndentingNewLine]", RowBox[{"Output", ":", " ", "distance"}], ";", "\[IndentingNewLine]", RowBox[{"Submodules", ":", " ", RowBox[{"dist", "[", "]"}]}]}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"DGcir1", "[", RowBox[{"T_", ",", "Seg_", ",", "r_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{"Return", "[", RowBox[{"Abs", "[", RowBox[{ RowBox[{"seg", "[", RowBox[{"T", ",", "Seg"}], "]"}], "-", "r"}], "]"}], "]"}]}], "\[IndentingNewLine]", " ", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"DGcir", "[", RowBox[{"T_", ",", "Seg_", ",", "r_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"seg", "[", RowBox[{"T", ",", "Seg"}], "]"}], "^", "2"}], "-", RowBox[{"r", "^", "2"}]}], ")"}], "^", "2"}]}], "\[IndentingNewLine]", " ", "]"}]}], ";"}]}]}]], "Input", CellChangeTimes->{{3.6799959272424545`*^9, 3.6799959714925165`*^9}, { 3.680187880725844*^9, 3.6801878813658447`*^9}, {3.6801879133558893`*^9, 3.6801879169258947`*^9}, {3.680188161286237*^9, 3.6801881618662376`*^9}, { 3.680188252966365*^9, 3.6801882616863775`*^9}, {3.6801883076464415`*^9, 3.680188367706526*^9}, {3.68018854232677*^9, 3.680188555186788*^9}, { 3.680188645956915*^9, 3.6801887056379986`*^9}, {3.6801889273883095`*^9, 3.680188930058313*^9}, {3.680189244018752*^9, 3.6801892847288094`*^9}, { 3.6801893580589123`*^9, 3.680189359168914*^9}, {3.680189420118999*^9, 3.6801894397690268`*^9}, {3.6801894730990734`*^9, 3.6801895437291718`*^9}, {3.6801900734149265`*^9, 3.680190086304945*^9}, { 3.6801901868050857`*^9, 3.6801903182252693`*^9}, {3.6801903981653814`*^9, 3.6801904303854265`*^9}, {3.680190477125492*^9, 3.6801906342057123`*^9}, { 3.680190665865756*^9, 3.6801906674757586`*^9}, {3.680191007020167*^9, 3.680191145620361*^9}, {3.680191176980405*^9, 3.6801912085004487`*^9}, { 3.680191325810613*^9, 3.680191412160734*^9}, {3.680191481260831*^9, 3.6801914918608456`*^9}, {3.6801915407409143`*^9, 3.6801916609210825`*^9}, {3.680191718901163*^9, 3.680191724661172*^9}, { 3.680191798661275*^9, 3.6801918474213433`*^9}, {3.6801920336116037`*^9, 3.680192064282647*^9}, {3.680192966581046*^9, 3.680193025731129*^9}, { 3.680193071341193*^9, 3.680193073591196*^9}, {3.6801931694413304`*^9, 3.6801931716413336`*^9}, {3.680193204341379*^9, 3.680193221921404*^9}, { 3.6801932521514463`*^9, 3.680193327011551*^9}, {3.6801934502717237`*^9, 3.680193456331732*^9}, {3.6801935486538625`*^9, 3.68019367538404*^9}, { 3.6802229763031774`*^9, 3.6802230363632617`*^9}, {3.6802233314036746`*^9, 3.680223369553728*^9}, {3.6802234540458508`*^9, 3.6802234659658675`*^9}, { 3.680223573446018*^9, 3.6802236119760723`*^9}, 3.6802245810804358`*^9, { 3.680224788350726*^9, 3.680224788880727*^9}, {3.68022576742412*^9, 3.68022578184414*^9}, 3.680225916668332*^9, {3.6802259495283785`*^9, 3.680225953498384*^9}, {3.680226611300305*^9, 3.6802266249203243`*^9}, { 3.6803192562639866`*^9, 3.680319259459597*^9}, {3.680323526767522*^9, 3.680323532564666*^9}, {3.681178043042704*^9, 3.6811780432927375`*^9}, { 3.8106202118283577`*^9, 3.8106202163739934`*^9}, {3.81062025582215*^9, 3.8106203134258823`*^9}, {3.810620365714431*^9, 3.8106203716352015`*^9}, { 3.8106204076250334`*^9, 3.810620442976353*^9}, 3.810643826124235*^9, { 3.8224846260504494`*^9, 3.822484637162073*^9}, {3.822484670626986*^9, 3.822484696127164*^9}},ExpressionUUID->"cd705a8e-6091-464f-8c7d-\ 77623549b419"] }, Open ]] }, WindowSize->{771, 762}, WindowMargins->{{-974, Automatic}, {-205, Automatic}}, FrontEndVersion->"12.0 for Microsoft Windows (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 2449, 33, 44, "Subsubsection",ExpressionUUID->"99b3be41-1c7d-4efb-9c0f-b7e6646fae69"], Cell[3032, 57, 4412, 85, 181, "Input",ExpressionUUID->"cd705a8e-6091-464f-8c7d-77623549b419"] }, Open ]] } ] *)