Le problème des 3 corps : partie 1 : l'un des corps est très massif par rapport aux...
[pst-eqdf.git] / gravitation / pb_3corps_1.tex
diff --git a/gravitation/pb_3corps_1.tex b/gravitation/pb_3corps_1.tex
new file mode 100644 (file)
index 0000000..833f286
--- /dev/null
@@ -0,0 +1,667 @@
+\r
+\documentclass{article}\r
+\usepackage[a4paper,margin=2cm]{geometry}\r
+\usepackage[T1]{fontenc}\r
+\usepackage[latin1]{inputenc}%\r
+\usepackage[garamond]{mathdesign}\r
+\usepackage{pst-eqdf,pst-node,pst-tools}\r
+\usepackage{array,amsmath}\r
+\usepackage{animate}\r
+\newpsstyle{vecteurA}{arrowinset=0.05,arrowsize=0.1,linecolor={[rgb]{1 0.5 0}}}\r
+\newpsstyle{vecteurB}{arrowinset=0.05,arrowsize=0.1,linecolor={[rgb]{0 0.5 1}}}\r
+\newpsstyle{vecteurC}{arrowinset=0.1,arrowsize=0.2,linecolor={[rgb]{1 0 0}}}\r
+%timeline\r
+\begin{filecontents}{pb2corps.dat}\r
+::0x0\r
+::1\r
+::2\r
+::3\r
+::4\r
+::5\r
+::6\r
+::7\r
+::8\r
+::9\r
+::10\r
+::11\r
+::12\r
+::13\r
+::14\r
+::15\r
+::16\r
+::17\r
+::18\r
+::19\r
+::20\r
+::21\r
+::22\r
+::23\r
+::24\r
+::25\r
+::26\r
+::27\r
+::28\r
+::29\r
+::30\r
+::31\r
+::32\r
+::33\r
+::34\r
+::35\r
+::36\r
+::37\r
+::38\r
+::39\r
+::40\r
+::41\r
+::42\r
+::43\r
+::44\r
+::45\r
+::46\r
+::47\r
+::48\r
+::49\r
+::50\r
+::51\r
+::52\r
+::53\r
+::54\r
+::55\r
+::56\r
+::57\r
+::58\r
+::59\r
+::60\r
+::61\r
+::62\r
+::63\r
+::64\r
+::65\r
+::66\r
+::67\r
+::68\r
+::69\r
+::70\r
+::71\r
+::72\r
+::73\r
+::74\r
+::75\r
+::76\r
+::77\r
+::78\r
+::79\r
+::80\r
+::81\r
+::82\r
+::83\r
+::84\r
+::85\r
+::86\r
+::87\r
+::88\r
+::89\r
+::90\r
+::91\r
+::92\r
+::93\r
+::94\r
+::95\r
+::96\r
+::97\r
+::98\r
+::99\r
+::100\r
+::101\r
+::102\r
+::103\r
+::104\r
+::105\r
+::106\r
+::107\r
+::108\r
+::109\r
+::110\r
+::111\r
+::112\r
+::113\r
+::114\r
+::115\r
+::116\r
+::117\r
+::118\r
+::119\r
+::120\r
+::121\r
+::122\r
+::123\r
+::124\r
+::125\r
+::126\r
+::127\r
+::128\r
+::129\r
+::130\r
+::131\r
+::132\r
+::133\r
+::134\r
+::135\r
+::136\r
+::137\r
+::138\r
+::139\r
+::140\r
+::141\r
+::142\r
+::143\r
+::144\r
+::145\r
+::146\r
+::147\r
+::148\r
+::149\r
+::150\r
+::151\r
+::152\r
+::153\r
+::154\r
+::155\r
+::156\r
+::157\r
+::158\r
+::159\r
+::160\r
+::161\r
+::162\r
+::163\r
+::164\r
+::165\r
+::166\r
+::167\r
+::168\r
+::169\r
+::170\r
+::171\r
+::172\r
+::173\r
+::174\r
+::175\r
+::176\r
+::177\r
+::178\r
+::179\r
+::180\r
+::181\r
+::182\r
+::183\r
+::184\r
+::185\r
+::186\r
+::187\r
+::188\r
+::189\r
+::190\r
+::191\r
+::192\r
+::193\r
+::194\r
+::195\r
+::196\r
+::197\r
+::198\r
+::199\r
+::200\r
+\end{filecontents}\r
+%%%%%%%%%%%%%%%%%%\r
+\title{Gravitation : le problème des trois corps avec PSTricks\\ partie 1}\r
+\date{7 juillet 2\,012}\r
+\begin{document}\r
+\maketitle\r
+\section{Système de trois corps, dont l'un est beaucoup plus massif que les deux autres}\r
+\subsection{Les équations}\r
+On considère un système de trois corps en interaction gravitationnelle $M$ de masse $m$, $M_1$ de masse $m_1$ et $M_2$ de masse $m_2$. On suppose que la masse de $M$ est très grande par rapport aux deux autres et que le repère $\mathcal{R}$ lié à $M$ est galiléen. Les deux corps $M_1$ et $M_2$ sont considérés comme des satellites de $M$. Pour l'étude des mouvements, on suppose que les corps sont ponctuels.\r
+\begin{center}\r
+\begin{pspicture}(-3,-1)(6,7)\r
+\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10,gridlabels=0pt]%\r
+\pstVerb{/x01 -3 def /y01 4 def\r
+         /x02  6 def /y02 6 def\r
+         /xr012 x02 x01 sub def\r
+         /yr012 y02 y01 sub def\r
+         /M0 10 def\r
+         /M1 3 def\r
+         /M2 1 def\r
+         /Mt M1 M2 add def\r
+         /xG012 x01 M1 mul x02 M2 mul add Mt div def\r
+         /yG012 y01 M1 mul y02 M2 mul add Mt div def\r
+         }%\r
+\pnode(0,0){O}\r
+\pnode(!x01 y01){M1}\r
+\pnode(!x02 y02){M2}\r
+\pnode(!xG012 yG012){C12} % centre de masse de M1 et M2\r
+\pscircle[fillstyle=solid,fillcolor=yellow!50](0,0){0.5}\r
+\pscircle[fillstyle=solid,fillcolor=red!50](M1){0.21}\r
+\pscircle[fillstyle=solid,fillcolor=blue!50](M2){0.07}\r
+\psline[linestyle=dotted](M1)(M2)\r
+\psline[linestyle=dashed](M2)(O)(M1)\r
+\psline{<->}(6,0)(0,0)(0,7)\r
+\uput{0.6}[dl](O){$M$}\r
+\uput[r](0,6.8){$y$}\r
+\uput[u](5.8,0){$x$}\r
+\uput[l](0,6.8){$\mathcal{R}$}\r
+\uput{0.22}[l](M1){$M_1$}\r
+\uput{0.1}[u](M2){$M_2$}\r
+\rput(M1){\psline[style=vecteurC]{->}(!xr012 10 div yr012 10 div)\uput[u](!xr012 10 div yr012 10 div){$\overrightarrow{F}_{2/1}$}\r
+          \psline[style=vecteurC]{->}(!x01 2.5 div neg y01 2.5 div neg)\uput[r](!x01 2.5 div neg y01 2.5 div neg){$\overrightarrow{F}_{M/1}$}}\r
+\rput(M2){\psline[style=vecteurC]{->}(!xr012 10 div neg yr012 10 div neg)\uput[u](!xr012 10 div neg yr012 10 div neg){$\overrightarrow{F}_{1/2}$}\r
+          \psline[style=vecteurC]{->}(!x02 5 div neg y02 5 div neg)\uput[r](!x02 5 div neg y02 5 div neg){$\overrightarrow{F}_{M/2}$}}\r
+\end{pspicture}\r
+\end{center}\r
+On note $\overrightarrow{r_{12}}=\overrightarrow{M_1M_2}$. $M_2$ subit de la part de $M_1$ une force attractive $\overrightarrow{F}_{1/2}$ et réciproquement $M_1$ subit de la part de $M_2$ une force attractive $\overrightarrow{F}_{2/1}$ telles que :\r
+\[\r
+\overrightarrow{F}_{1/2}=-\mathcal{G}\frac{m_1m_2}{r_{12}^3}\overrightarrow{r_{12}}\quad \overrightarrow{F}_{2/1}=+\mathcal{G}\frac{m_1m_2}{r_{12}^3}\overrightarrow{r_{12}}\r
+\]\r
+On note $\overrightarrow{r_{1}}=\overrightarrow{MM_1}$ et $\overrightarrow{r_{2}}=\overrightarrow{MM_2}$. $M_1$ subit de la part de $M$ une force attractive $\overrightarrow{F}_{M/1}$ et $M_2$ subit de la part de $M$ une force attractive $\overrightarrow{F}_{M/2}$ :\r
+\[\r
+\overrightarrow{F}_{M/1}=-\mathcal{G}\frac{mm_1}{r^3_1}\overrightarrow{r_1}\quad \overrightarrow{F}_{M/2}=-\mathcal{G}\frac{mm_2}{r^3_2}\overrightarrow{r_2}\r
+\]\r
+La loi de Newton appliquée à chacune des particules $M_1$ et $M_2$ s'écrit :\r
+\[\r
+m_1\frac{\mathrm{d}^2\overrightarrow{r_1}}{\mathrm{d}t^2}=-\mathcal{G}\frac{m_1m_2}{r_{12}^3}\overrightarrow{r_{12}}-\r
+ \mathcal{G}\frac{mm_1}{r^3_1}\overrightarrow{r_1}\r
+\]\r
+\[\r
+m_2\frac{\mathrm{d}^2\overrightarrow{r_2}}{\mathrm{d}t^2}=\mathcal{G}\frac{m_1m_2}{r_{12}^3}\overrightarrow{r_{12}}-\r
+ \mathcal{G}\frac{mm_2}{r^3_2}\overrightarrow{r_2}\r
+\]\r
+Sachant que $r_{12}=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2}$, que $r_1=\sqrt{x_1^2+y_1^2}$ et $r_1=\sqrt{x_2^2+y_2^2}$, nous obtenons un système de quatre équations différentielles :\r
+\[\r
+\left\{\r
+\begin{array}[m]{l}\r
+ \ddot{x_1}=\hphantom{-}\mathcal{G}\displaystyle\frac{m_2}{r^3_{12}}(x_2-x_1)-\mathcal{G}\frac{m}{r^3_1}x_1\\[1em]\r
+ \ddot{y_1}=\hphantom{-}\mathcal{G}\displaystyle\frac{m_2}{r^3_{12}}(y_2-y_1)-\mathcal{G}\frac{m}{r^3_1}y_1\\[1em]\r
+ \ddot{x_2}=-\mathcal{G}\displaystyle\frac{m_1}{r^3_{12}}(x_2-x_1)-\mathcal{G}\frac{m}{r^3_2}x_2\\[1em]\r
+ \ddot{y_2}=-\mathcal{G}\displaystyle\frac{m_1}{r^3_{12}}(y_2-y_1)-\mathcal{G}\frac{m}{r^3_2}y_2\r
+\end{array}\r
+\right.\r
+\]\r
+\subsection{La résolution numérique avec pst-eqdf}\r
+Voici comment placer sur la pile les différentes variables, ainsi que le système d'équations en notation algébrique. Il faut retenir la notation utilisée pour représenter les variables en fonction de leurs positions respectives sur la pile :\r
+\begin{verbatim}\r
+%   0    1    2    3    4    5    6    7\r
+% y[0] y[1] y[2] y[3] y[4] y[5] y[6] y[7]\r
+% x1    y1  x'1  y'1  x2   y2   x'2  y'2\r
+\def\GravAlgIIcorps{%\r
+  y[2]|y[3]|%\r
+  M2*(y[4]-y[0])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M*y[0]/(y[0]^2+y[1]^2)^1.5|%\r
+  M2*(y[5]-y[1])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M*y[1]/(y[0]^2+y[1]^2)^1.5|%\r
+  y[6]|y[7]|%\r
+  M1*(y[0]-y[4])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M*y[4]/(y[4]^2+y[5]^2)^1.5|%\r
+  M1*(y[1]-y[5])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M*y[5]/(y[4]^2+y[5]^2)^1.5}\r
+\end{verbatim}\r
+Les conditions initiales, positions et vitesses respectives de $M_1$ et $M_2$, déterminent l'évolution du système.\r
+\begin{verbatim}\r
+\def\InitCond{x01 y01 v0x1 v0y1 x02 y02 v0x2 v0y2}\r
+\end{verbatim}\r
+Elles sont définies dans l'environnement \verb+\begin{pspicture}+ :\r
+\begin{verbatim}\r
+\pstVerb{\r
+        /x01 -1 def /y01 0 def\r
+        /x02  5 def /y02 0 def\r
+        /v0x1 0 def\r
+        /v0y1 25 def\r
+        /v0x2 0 def\r
+        /v0y2 -10 def\r
+        /M 500 def\r
+        /M1 10 def\r
+        /M2 1 def\r
+        }%\r
+\end{verbatim}\r
+%   0    1    2    3    4    5    6    7\r
+% y[0] y[1] y[2] y[3] y[4] y[5] y[6] y[7]\r
+% x1    y1  x'1  y'1  x2   y2   x'2  y'2\r
+\def\GravAlgIIIcorps{%\r
+  y[2]|y[3]|%\r
+  M2*(y[4]-y[0])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M0*y[0]/(y[0]^2+y[1]^2)^1.5|%\r
+  M2*(y[5]-y[1])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M0*y[1]/(y[0]^2+y[1]^2)^1.5|%\r
+  y[6]|y[7]|%\r
+  M1*(y[0]-y[4])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M0*y[4]/(y[4]^2+y[5]^2)^1.5|%\r
+  M1*(y[1]-y[5])/((y[4]-y[0])^2+(y[5]-y[1])^2)^1.5-M0*y[5]/(y[4]^2+y[5]^2)^1.5}\r
+\r
+Quelle durée choisir pour les calculs ? On suppose que les interactions entre les deux satellites sont négligeables, et on calcule la période de chacun d'eux.\r
+\begin{verbatim}\r
+\rput(-2,0){\psPrintValue[decimals=4]{periode1}\hphantom{000000}s}\r
+\rput(-2,1){\psPrintValue[decimals=4]{periode2}\hphantom{000000}s}\r
+\end{verbatim}\r
+La durée choisie qui doit être identique pour les deux, est la plus grande des périodes.\r
+\begin{verbatim}\r
+\psequadiff[whichabs=0,whichord=1,\r
+            plotpoints=1000,algebraic,\r
+            tabname=X1Y1\r
+            ,saveData,filename=IIIXYM1.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=red]{X1Y1 aload pop}\r
+\psequadiff[whichabs=4,whichord=5,\r
+            plotpoints=1000,algebraic,\r
+            tabname=X2Y2\r
+            ,saveData,filename=IIIXYM2.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=blue]{X2Y2 aload pop}\r
+\end{verbatim}\r
+\r
+%\newpage\r
+\begin{center}\r
+\def\InitCond{ x01  y01  v0x1  v0y1 x02 y02 v0x2  v0y2}\r
+\psset{method=rk4}\r
+\begin{pspicture}(-6,-6)(6,6)\r
+\pstVerb{\r
+/arccos {\r
+   dup\r
+   dup mul neg 1 add sqrt\r
+   exch\r
+   atan\r
+} def\r
+        /G 1 def\r
+        /x01 -1 def /y01 0 def\r
+        /x02  5 def /y02 0 def\r
+        /v0x1 0 def\r
+        /v0y1 25 def\r
+        /v0x2 0 def\r
+        /v0y2 -10 def\r
+        /M0 500 def\r
+        /M1 10 def\r
+        /M2 1 def\r
+        /xG012 M1 x01 mul M2 x02 mul add M1 M2 add div def\r
+        /yG012 M1 y01 mul M2 y02 mul add M1 M2 add div def\r
+% calcul des périodes en supposant les interactions\r
+% entre les 2 satellites négligeables\r
+% satellite 1\r
+        /Cste1 x01 v0y1 mul def % Cste des aires pour 1\r
+        /Energie1 0.5 M1 mul v0y1 2 exp mul % 1/2 mv^2\r
+                 G M1 M0 mul mul x01 abs div sub def\r
+         /par1 Cste1 dup mul M0 div def %\r
+         /exc1 2 Cste1 dup mul mul Energie1 mul M1 div M0 dup mul div 1 add sqrt def\r
+         /a_1 par1 1 exc1 dup mul sub div def % demi-grand axe\r
+         /periode1 6.283185 a_1 3 exp G div M0 div sqrt mul def\r
+% satellite 2\r
+        /Cste2 x02 v0y2 mul def % Cste des aires pour 2\r
+        /Energie2 0.5 M2 mul v0y2 2 exp mul % 1/2 mv^2\r
+                 G M2 M0 mul mul x02 abs div sub def\r
+         /par2 Cste2 dup mul M0 div def %\r
+         /exc2 2 Cste2 dup mul mul Energie2 mul M2 div M0 dup mul div 1 add sqrt def\r
+         /a_2 par2 1 exc2 dup mul sub div def % demi-grand axe\r
+         /periode2 6.283185 a_2 3 exp G div M0 div sqrt mul def\r
+         }%\r
+\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10,gridlabels=8pt](-6,-6)(6,6)%\r
+\psequadiff[whichabs=0,whichord=1,\r
+            plotpoints=1000,algebraic,\r
+            tabname=X1Y1\r
+            ,saveData,filename=IIIXYM1.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=red]{X1Y1 aload pop}\r
+\psequadiff[whichabs=4,whichord=5,\r
+            plotpoints=1000,algebraic,\r
+            tabname=X2Y2\r
+            ,saveData,filename=IIIXYM2.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=blue]{X2Y2 aload pop}\r
+\pnode(!x01 y01){M01}\r
+\pnode(!x02 y02){M02}\r
+\pscircle[fillstyle=solid,fillcolor=red!50](0,0){0.25}\r
+\pscircle[fillstyle=solid,fillcolor=gray!50](M01){0.15}\r
+\pscircle[fillstyle=solid,fillcolor=blue!50](M02){0.07}\r
+\rput(M01){\psline[unit=0.2,linecolor=red]{->}(!v0x1 v0y1)}\r
+\rput(M02){\psline[unit=0.2,linecolor=blue]{->}(!v0x2 v0y2)}\r
+\rput(-2,0){\psPrintValue[decimals=4]{periode1}\hphantom{000000}s}\r
+\rput(-2,1){\psPrintValue[decimals=4]{periode2}\hphantom{000000}s}\r
+\end{pspicture}\r
+\end{center}\r
+%\newpage\r
+\subsection{L'animation}\r
+On peut voir sur l'animation, que les périodes précédemment calculées ne sont qu'approximatives, ainsi le satellite le plus éloigné fait un peu plus d'un tour.\r
+\r
+On remarquera d'autre part que, sur la durée choisie, les trajectoires sont bouclées : le système des 3 corps est stable avec les conditions initiales choisies.\r
+\r
+\begin{center}\r
+%\r
+\def\nFrames{200}% 200 images\r
+\begin{animateinline}[controls,timeline=pb2corps.dat,%loop,\r
+                     begin={\begin{pspicture}(-6,-6)(6,6)},\r
+                     end={\end{pspicture}}]{10}% 10 images/s\r
+\pstVerb{/XY1 [(IIIXYM1.dat) run] def\r
+         /XY2 [(IIIXYM2.dat) run] def}\r
+\psframe*[linecolor={[cmyk]{1 1 0 0.7}}](-6,-6)(6,6)\r
+\psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=0pt]%\r
+\listplot[linecolor=gray]{XY1 aload pop}\r
+\listplot[linecolor=gray]{XY2 aload pop}\r
+\pscircle[fillstyle=solid,fillcolor=red!50](0,0){0.4}\r
+\newframe\r
+\multiframe{\nFrames}{i=0+10}{% 1 point sur 10\r
+\pstVerb{/X1 XY1 \i\space get def\r
+         /Y1 XY1 \i\space 1 add get def\r
+         /X2 XY2 \i\space get def\r
+         /Y2 XY2 \i\space 1 add get def\r
+        }%\r
+\pscircle[fillstyle=solid,fillcolor=gray!80](!X1 Y1){0.2}\r
+\pscircle[fillstyle=solid,fillcolor=yellow](!X2 Y2){0.1}\r
+}\r
+\end{animateinline}\r
+\end{center}\r
+\newpage\r
+\section{Mouvements relatifs}\r
+\subsection{Mouvements vus de $M_1$}\r
+Les coordonnées de $M_2$ rapportées à $M_1$  sont :\r
+\[\r
+\left\{\r
+\begin{array}[m]{l}\r
+ x_{2/1}=x_2-x_1\\[1em]\r
+ y_{2/1}=y_2-y_1\\[1em]\r
+\end{array}\r
+\right.\r
+\]\r
+Celles de $M$ sont $(-x_1,-y_1)$.\r
+\begin{verbatim}\r
+%   0    1    2    3    4    5    6    7\r
+% y[0] y[1] y[2] y[3] y[4] y[5] y[6] y[7]\r
+% x1    y1  x'1  y'1  x2   y2   x'2  y'2\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y dup 0 get exch\r
+                      4 get sub,\r
+            plotfuncy=dup 1 get exch\r
+                      5 get sub,\r
+            tabname=XY21,\r
+%            ,saveData,filename=IIIM21.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y 0 get neg,\r
+            plotfuncy=1 get neg,\r
+            tabname=XY01\r
+%            ,saveData,filename=IIIXY01.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\end{verbatim}\r
+\begin{center}\r
+\def\InitCond{ x01  y01  v0x1  v0y1 x02 y02 v0x2  v0y2}\r
+\psset{method=rk4}\r
+\begin{pspicture}(-7,-6)(6,6)\r
+\pstVerb{\r
+        /G 1 def\r
+        /x01 -1 def /y01 0 def\r
+        /x02  5 def /y02 0 def\r
+        /v0x1 0 def\r
+        /v0y1 25 def\r
+        /v0x2 0 def\r
+        /v0y2 -10 def\r
+        /M0 500 def\r
+        /M1 10 def\r
+        /M2 1 def\r
+        /xG012 M1 x01 mul M2 x02 mul add M1 M2 add div def\r
+        /yG012 M1 y01 mul M2 y02 mul add M1 M2 add div def\r
+% calcul des périodes en supposant les interactions\r
+% entre les 2 satellites négligeables\r
+% satellite 1\r
+        /Cste1 x01 v0y1 mul def % Cste des aires pour 1\r
+        /Energie1 0.5 M1 mul v0y1 2 exp mul % 1/2 mv^2\r
+                 G M1 M0 mul mul x01 abs div sub def\r
+         /par1 Cste1 dup mul M0 div def %\r
+         /exc1 2 Cste1 dup mul mul Energie1 mul M1 div M0 dup mul div 1 add sqrt def\r
+         /a_1 par1 1 exc1 dup mul sub div def % demi-grand axe\r
+         /periode1 6.283185 a_1 3 exp G div M0 div sqrt mul def\r
+% satellite 2\r
+        /Cste2 x02 v0y2 mul def % Cste des aires pour 2\r
+        /Energie2 0.5 M2 mul v0y2 2 exp mul % 1/2 mv^2\r
+                 G M2 M0 mul mul x02 abs div sub def\r
+         /par2 Cste2 dup mul M0 div def %\r
+         /exc2 2 Cste2 dup mul mul Energie2 mul M2 div M0 dup mul div 1 add sqrt def\r
+         /a_2 par2 1 exc2 dup mul sub div def % demi-grand axe\r
+         /periode2 6.283185 a_2 3 exp G div M0 div sqrt mul def\r
+         }%\r
+\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10,gridlabels=0pt](-7,-6)(6,6)%\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y dup 4 get exch\r
+                      0 get sub,\r
+            plotfuncy=dup 5 get exch\r
+                      1 get sub,\r
+            tabname=XY21\r
+%            ,saveData,filename=IIIM21.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=blue]{XY21 aload pop}\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y 0 get neg,\r
+            plotfuncy=1 get neg,\r
+            tabname=XYM01\r
+%            ,saveData,filename=IIIXYM01.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=red]{XYM01 aload pop}\r
+\pnode(!x02 x01 sub y02 y01 sub){M021}\r
+\pnode(!x01 neg y01 neg){M001}\r
+\pscircle[fillstyle=solid,fillcolor=gray!80](0,0){0.2}\r
+\pscircle[fillstyle=solid,fillcolor=red!50](M001){0.25}\r
+\pscircle[fillstyle=solid,fillcolor=blue](M021){0.07}\r
+\rput(M021){\psline[unit=0.1,linecolor=blue,arrowinset=0.2,arrowsize=2]{->}(!v0x2 v0x1 sub v0y2 v0y1 sub)}\r
+\rput(M001){\psline[unit=0.1,linecolor=red,arrowinset=0.2,arrowsize=2]{->}(!v0x1 neg v0y1 neg)}\r
+\rput(-3,0){\psPrintValue[decimals=4]{periode1}\hphantom{000000}s}\r
+\rput(-3,1){\psPrintValue[decimals=4]{periode2}\hphantom{000000}s}\r
+\end{pspicture}\r
+\end{center}\r
+\subsection{Mouvements vus de $M_2$}\r
+Les coordonnées de $M_1$ rapportées à $M_2$  sont :\r
+\[\r
+\left\{\r
+\begin{array}[m]{l}\r
+ x_{1/2}=x_1-x_2\\[1em]\r
+ y_{1/2}=y_1-y_2\\[1em]\r
+\end{array}\r
+\right.\r
+\]\r
+Celles de $M$ sont $(-x_2,-y_2)$.\r
+\begin{verbatim}\r
+%   0    1    2    3    4    5    6    7\r
+% y[0] y[1] y[2] y[3] y[4] y[5] y[6] y[7]\r
+% x1    y1  x'1  y'1  x2   y2   x'2  y'2\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y dup 4 get exch\r
+                      0 get sub,\r
+            plotfuncy=dup 5 get exch\r
+                      1 get sub,\r
+            tabname=XY12,\r
+%            ,saveData,filename=IIIM12.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y 4 get neg,\r
+            plotfuncy=5 get neg,\r
+            tabname=XYM02\r
+%            ,saveData,filename=IIIXYM02.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\end{verbatim}\r
+\begin{center}\r
+\def\InitCond{ x01  y01  v0x1  v0y1 x02 y02 v0x2  v0y2}\r
+\psset{method=rk4}\r
+\begin{pspicture}(-7,-6)(6,6)\r
+\pstVerb{\r
+        /G 1 def\r
+        /x01 -1 def /y01 0 def\r
+        /x02  5 def /y02 0 def\r
+        /v0x1 0 def\r
+        /v0y1 25 def\r
+        /v0x2 0 def\r
+        /v0y2 -10 def\r
+        /M0 500 def\r
+        /M1 10 def\r
+        /M2 1 def\r
+        /xG012 M1 x01 mul M2 x02 mul add M1 M2 add div def\r
+        /yG012 M1 y01 mul M2 y02 mul add M1 M2 add div def\r
+% calcul des périodes en supposant les interactions\r
+% entre les 2 satellites négligeables\r
+% satellite 1\r
+        /Cste1 x01 v0y1 mul def % Cste des aires pour 1\r
+        /Energie1 0.5 M1 mul v0y1 2 exp mul % 1/2 mv^2\r
+                 G M1 M0 mul mul x01 abs div sub def\r
+         /par1 Cste1 dup mul M0 div def %\r
+         /exc1 2 Cste1 dup mul mul Energie1 mul M1 div M0 dup mul div 1 add sqrt def\r
+         /a_1 par1 1 exc1 dup mul sub div def % demi-grand axe\r
+         /periode1 6.283185 a_1 3 exp G div M0 div sqrt mul def\r
+% satellite 2\r
+        /Cste2 x02 v0y2 mul def % Cste des aires pour 2\r
+        /Energie2 0.5 M2 mul v0y2 2 exp mul % 1/2 mv^2\r
+                 G M2 M0 mul mul x02 abs div sub def\r
+         /par2 Cste2 dup mul M0 div def %\r
+         /exc2 2 Cste2 dup mul mul Energie2 mul M2 div M0 dup mul div 1 add sqrt def\r
+         /a_2 par2 1 exc2 dup mul sub div def % demi-grand axe\r
+         /periode2 6.283185 a_2 3 exp G div M0 div sqrt mul def\r
+         }%\r
+\psgrid[subgriddiv=0,gridcolor=lightgray,griddots=10,gridlabels=0pt](-7,-6)(6,6)%\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y dup 0 get exch\r
+                      4 get sub,\r
+            plotfuncy=dup 1 get exch\r
+                      5 get sub,\r
+            tabname=XYM12\r
+            ,saveData,filename=IIIXYM12.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=blue]{XYM12 aload pop}\r
+\psequadiff[plotpoints=1000,algebraic,\r
+            plotfuncx=y 4 get neg,\r
+            plotfuncy=5 get neg,\r
+            tabname=XYM02\r
+            ,saveData,filename=IIIXYM02.dat\r
+            ]{0}{periode2}{\InitCond}{\GravAlgIIIcorps}\r
+\listplot[unit=1,linecolor=red]{XYM02 aload pop}\r
+\pnode(!x01 x02 sub y01 y02 sub){M012}\r
+\pnode(!x02 neg y02 neg){M002}\r
+\pscircle[fillstyle=solid,fillcolor=gray!80](0,0){0.2}\r
+\pscircle[fillstyle=solid,fillcolor=red!50](M002){0.25}\r
+\pscircle[fillstyle=solid,fillcolor=blue](M012){0.07}\r
+\rput(M012){\psline[unit=0.1,linecolor=blue,arrowinset=0.2,arrowsize=2]{->}(!v0x1 v0x2 sub v0y1 v0y2 sub)}\r
+\rput(M002){\psline[unit=0.1,linecolor=red,arrowinset=0.2,arrowsize=2]{->}(!v0x2 neg v0y2 neg)}\r
+\rput(-3,0){\psPrintValue[decimals=4]{periode1}\hphantom{000000}s}\r
+\rput(-3,1){\psPrintValue[decimals=4]{periode2}\hphantom{000000}s}\r
+\end{pspicture}\r
+\end{center}\r
+\subsection{Animation}\r
+\begin{center}\r
+%\r
+\def\nFrames{200}% 200 images\r
+\begin{animateinline}[controls,timeline=pb2corps.dat,%loop,\r
+                     begin={\begin{pspicture}(-7,-6)(7,6)},\r
+                     end={\end{pspicture}}]{10}% 10 images/s\r
+\pstVerb{/XY1 [(IIIXYM12.dat) run] def\r
+         /XY2 [(IIIXYM02.dat) run] def}\r
+\psframe*[linecolor={[cmyk]{1 1 0 0.7}}](-7,-6)(7,6)\r
+\psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=0pt]%\r
+\listplot[linecolor=gray]{XY1 aload pop}\r
+\listplot[linecolor=gray]{XY2 aload pop}\r
+\pscircle[fillstyle=solid,fillcolor=gray!80](0,0){0.2}\r
+\newframe\r
+\multiframe{\nFrames}{i=0+10}{% 1 point sur 10\r
+\pstVerb{/X1 XY1 \i\space get def\r
+         /Y1 XY1 \i\space 1 add get def\r
+         /X2 XY2 \i\space get def\r
+         /Y2 XY2 \i\space 1 add get def\r
+        }%\r
+\pscircle[fillstyle=solid,fillcolor=yellow](!X1 Y1){0.1}\r
+\pscircle[fillstyle=solid,fillcolor=red!50](!X2 Y2){0.4}\r
+}\r
+\end{animateinline}\r
+\end{center}\r
+\end{document} 
\ No newline at end of file

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.