(* 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[ 9753, 297] NotebookOptionsPosition[ 8831, 266] NotebookOutlinePosition[ 9230, 283] CellTagsIndexPosition[ 9187, 280] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"<<", "PhysicalConstants`"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"kappa", "=", RowBox[{"GravitationalConstant", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.559302864109375*^9, 3.5593028686875*^9}, { 3.559302907671875*^9, 3.559302920125*^9}, {3.559302994796875*^9, 3.55930314621875*^9}, 3.559303334125*^9, {3.559303376125*^9, 3.559303379875*^9}}], Cell[BoxData[ RowBox[{"casTed", "=", RowBox[{"AbsoluteTime", "[", RowBox[{"Date", "[", "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.55930213409375*^9, 3.559302280703125*^9}, { 3.55930231515625*^9, 3.55930234228125*^9}, {3.559302622453125*^9, 3.55930262253125*^9}, 3.55930265575*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"\[CapitalDelta]t", "=", "120"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"casMinus", "=", RowBox[{"casTed", "-", "\[CapitalDelta]t"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"casPlus", "=", RowBox[{"casTed", "+", "\[CapitalDelta]t"}]}], ";"}]}], "Input", CellChangeTimes->{{3.55930213409375*^9, 3.559302280703125*^9}, { 3.55930231515625*^9, 3.55930234228125*^9}, {3.559302622453125*^9, 3.55930262253125*^9}, 3.55930265575*^9, {3.559303394203125*^9, 3.559303394953125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"rZeme0", "=", RowBox[{"AstronomicalData", "[", RowBox[{"\"\\"", ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"DateList", "[", "casTed", "]"}]}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.559302580625*^9, 3.559302607328125*^9}, 3.559303397984375*^9}], Cell[BoxData[ RowBox[{ RowBox[{"vZeme0", "=", RowBox[{ FractionBox["1", RowBox[{"2", "*", "\[CapitalDelta]t"}]], RowBox[{"(", RowBox[{ RowBox[{"AstronomicalData", "[", RowBox[{"\"\\"", ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"DateList", "[", "casPlus", "]"}]}], "}"}]}], "]"}], "-", RowBox[{"AstronomicalData", "[", RowBox[{"\"\\"", ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"DateList", "[", "casMinus", "]"}]}], "}"}]}], "]"}]}], ")"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.55930241234375*^9, 3.5593024701875*^9}, { 3.559302541578125*^9, 3.559302575015625*^9}, 3.559303401015625*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"mZeme", "=", RowBox[{"AstronomicalData", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"mSlunce", "=", RowBox[{"AstronomicalData", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"silaSlunceNaZemi", "=", RowBox[{ RowBox[{"kappa", "*", FractionBox[ RowBox[{"mZeme", "*", "mSlunce"}], SuperscriptBox[ RowBox[{"Norm", "[", RowBox[{ RowBox[{"-", RowBox[{"rZeme", "[", "t", "]"}]}], "+", RowBox[{"rSlunce", "[", "t", "]"}]}], "]"}], "3"]], "*", RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"rZeme", "[", "t", "]"}]}], "+", RowBox[{"rSlunce", "[", "t", "]"}]}], ")"}]}], "/.", RowBox[{ RowBox[{"rSlunce", "[", "t", "]"}], "\[Rule]", "0"}]}]}]}], "Input", CellChangeTimes->{{3.55930348596875*^9, 3.5593034903125*^9}, { 3.559303531796875*^9, 3.559303650921875*^9}, {3.5593036903125*^9, 3.55930371346875*^9}, {3.5593037438125*^9, 3.55930383609375*^9}, { 3.559304106390625*^9, 3.5593041259375*^9}}], Cell[BoxData[ RowBox[{"rov", "=", RowBox[{ RowBox[{"mZeme", "*", " ", RowBox[{ RowBox[{"rZeme", "''"}], "[", "t", "]"}]}], "==", "silaSlunceNaZemi"}]}]], "Input", CellChangeTimes->{{3.559304050984375*^9, 3.55930410384375*^9}, { 3.55930414190625*^9, 3.5593041673125*^9}}], Cell[BoxData[ RowBox[{"pocPodm", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"rZeme", "[", "0", "]"}], "==", "rZeme0"}], ",", RowBox[{ RowBox[{ RowBox[{"rZeme", "'"}], "[", "0", "]"}], "\[Equal]", "vZeme0"}]}], "}"}]}]], "Input", CellChangeTimes->{{3.559304185640625*^9, 3.559304232890625*^9}}], Cell[BoxData[ RowBox[{"rovs", "=", RowBox[{"Flatten", "[", RowBox[{"{", RowBox[{"rov", ",", "pocPodm"}], "}"}], "]"}]}]], "Input", CellChangeTimes->{{3.5593042689375*^9, 3.559304295*^9}, {3.5593054774375*^9, 3.559305478765625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"tmax", "=", RowBox[{"3600", "*", "24", "*", "365.25"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"res1", "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{"rovs", ",", "rZeme", ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "Input", CellChangeTimes->{{3.559305488234375*^9, 3.559305495125*^9}, { 3.55930552675*^9, 3.5593055608125*^9}, {3.559305623125*^9, 3.559305624890625*^9}, {3.559306623390625*^9, 3.55930667696875*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"fce", "=", RowBox[{"rZeme", "/.", "res1"}]}], ";"}]], "Input", CellChangeTimes->{{3.559306533875*^9, 3.559306557078125*^9}, 3.559306629484375*^9}], Cell[BoxData["rovs"], "Input", CellChangeTimes->{{3.559306401625*^9, 3.559306435734375*^9}, { 3.559306484296875*^9, 3.5593064863125*^9}, {3.559306578796875*^9, 3.559306579125*^9}, 3.5593073035625*^9}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.5593075973125*^9, 3.5593076241875*^9}, { 3.5593076780625*^9, 3.55930775996875*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"cara2", "=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"Thickness", "[", "0.006", "]"}], ",", RowBox[{"Line", "[", RowBox[{"souradnice2D", "/@", RowBox[{"Range", "[", RowBox[{"0", ",", "tmax", ",", RowBox[{"0.2", "tmax"}]}], "]"}]}], "]"}]}], "}"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5593078695625*^9, 3.559308002984375*^9}, { 3.559308038234375*^9, 3.559308055765625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"souradnice2D", "[", "t_", "]"}], ":=", RowBox[{"Take", "[", RowBox[{ RowBox[{"fce", "[", "t", "]"}], ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bod", "[", "t_", "]"}], ":=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{"Red", ",", RowBox[{"PointSize", "[", "0.1", "]"}], ",", RowBox[{"Point", "[", RowBox[{"souradnice2D", "[", "t", "]"}], "]"}]}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cara", "=", RowBox[{ RowBox[{"Cases", "[", RowBox[{ RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"souradnice2D", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}]}], "]"}], ",", RowBox[{"Line", "[", "_", "]"}], ",", RowBox[{"{", RowBox[{"0", ",", "Infinity"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"rn", "=", RowBox[{"5", "*", SuperscriptBox["10", "11"]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"bod", "[", "t", "]"}], ",", "cara2", ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "rn"}], ",", "rn"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "rn"}], ",", "rn"}], "}"}]}], "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"ControlPlacement", "\[Rule]", "Top"}]}], "\[IndentingNewLine]", "]"}]}], "Input", CellChangeTimes->{{3.559306755859375*^9, 3.559306936234375*^9}, { 3.559306980515625*^9, 3.55930707371875*^9}, {3.559307116328125*^9, 3.559307170453125*^9}, {3.559307232828125*^9, 3.55930728925*^9}, { 3.55930776271875*^9, 3.559307785359375*^9}, {3.559307989671875*^9, 3.559307990640625*^9}}], Cell[BoxData["res1"], "Input"] }, WindowSize->{1272, 683}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, ShowSelection->True, Magnification->2.000000238418579, 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, 62, 1, 57, "Input"], Cell[610, 23, 410, 10, 92, "Input"], Cell[1023, 35, 300, 6, 57, "Input"], Cell[1326, 43, 556, 13, 126, "Input"], Cell[1885, 58, 358, 10, 57, "Input"], Cell[2246, 70, 768, 20, 161, "Input"], Cell[3017, 92, 1176, 32, 199, "Input"], Cell[4196, 126, 294, 8, 57, "Input"], Cell[4493, 136, 332, 10, 57, "Input"], Cell[4828, 148, 248, 6, 57, "Input"], Cell[5079, 156, 560, 13, 92, "Input"], Cell[5642, 171, 190, 5, 57, "Input"], Cell[5835, 178, 208, 3, 57, "Input"], Cell[6046, 183, 134, 2, 57, "Input"], Cell[6183, 187, 519, 14, 126, "Input"], Cell[6705, 203, 2089, 59, 332, "Input"], Cell[8797, 264, 30, 0, 57, "Input"] } ] *) (* End of internal cache information *)