This list will produce a circular orbital plot:
eulerStep[{t_, state_List}, h_, f_List] := {t + h, state + h Through[f[{t, state}]]} solveSystemEuler[{t0_, state0_}, h_, n_Integer, f_List] := NestList[eulerStep[#, h, f] &, {t0, state0}, n] midptStep[{t_, state_List}, h_, f_List] := {t + h, state + h Through[ f[{t + 1/2 h, state + 1/2 h Through[f[{t, state}]]}]]} solveSytemMidPt[{t0_, state0_}, h_, n_Integer, f_List] := NestList[midptStep[#, h, f] &, {t0, state0}, n] L = 1/2 (x'[t]^2 + y'[t]^2) + 1/Sqrt[x[t]^2 + y[t]^2]; D[D[L, x'[t]], t] - D[L, x[t]] == 0 D[D[L, y'[t]], t] - D[L, y[t]] == 0 xdot[{t_, {x_, vx_, y_, vy_}}] := vx vxdot[{t_, {x_, vx_, y_, vy_}}] := -x/(x^2 + y^2)^(3/2) ydot[{t_, {x_, vx_, y_, vy_}}] := vy vydot[{t_, {x_, vx_, y_, vy_}}] := -y/(x^2 + y^2)^(3/2) start = {1, 0, 0, 1}; fcns = {xdot, vxdot, ydot, vydot}; orbit = solveSystemEuler[{0, start}, 0.01, 800, fcns]; xypts = orbit\[Transpose][[2]]\[Transpose][[{1, 3}]]\[Transpose]; ListPlot[xypts]
Orbital initial velocity is replaced by 1.25:
earthorbit=xypts;
spacestart = {1, 0, 0, 1.25};
orbit = solveSystemMidpt[{0, spacestart}, 0.01, 2200, fcns]; spacehiporbit = orbit\[Transpose][[2]]\[Transpose][[{1, 3}]]\[Transpose]; ListPlot[spacehiporbit]
Then put earth orbit on the same graph plot.
ListLinePlot[{earthorbit, spacehiporbit}, PlotStyle -> {Hue[0], Hue[0.66]}, AspectRatio -> Automatic]
I want to show is a few points along a hundred-long space orbit. i want to show 22 graphics like this but i doesn't work just the frame. Is my code correct? what's the problem?
Table[MultipleListPlot[Take[earthorbit, {n, n + 100}], Take[spaceshiporbit, {n, n + 100}], PlotJoined -> True, SymbolShape -> None, PlotStyle -> {Hue[0], Hue[0.66]}, PlotRange -> {{-3.6, 1.2}, {-2, 2}}, AspectRatio -> Automatic];, {n, 1, 2200, 100}];
then I change the code as follows:
Table[ListLinePlot[Take[earthorbit, {n, n + 100}], Take[spaceshiporbit, {n, n + 100}], PlotStyle -> {Hue[0], Hue[0.66]}, PlotRange -> {{-3.6, 1.2}, {-2, 2}}, AspectRatio -> Automatic];, {n, 1, 2200, 100}];
[![enter image description here][1]][1]
I hope someone can help me. Thank You
I want to show the graphics with codes in figure 4 from your mr. But even i tried to use your codes, it doesn't my expected.
The graphics I want as below mr. Alex Trounev
[![enter image description here][2]][2]
ListPlot[Transpose[{Column[Column[orbit,2],1],Column[Column[orbit,2],2]}],AxesLabel->{"x","Vx"}]
ListPlot[Transpose[{Column[Column[orbit,2],3],Column[Column[orbit,2],4]}],AxesLabel->{"y","Vy"}]
Mr @Alex Trounev Im sorry. This codes is very old version and i need you some help to fix this codes . sorry to make you very busy about my problem. Big thanks mr Alex Trounev.
vyvsy=Interpolation[Transpose[{Column[Column[Take[orbit,1100],2],4],Column[Column[Take[orbit,1100],2],3]}]]
vxvsx=Interpolation[Transpose[{Column[Column[Take[orbit,{550,1650}],2],2],Column[Column[Take[orbit,{550,1650}],2],1]}]]
vxvst=Interpolation[Transpose[{Column[Column[Take[orbit,-1100],2],2],Column[Take[orbit,-1100],1]}]]