Cette partie donne des explications sur la représentation des orbites à partir des...
[pst-eqdf.git] / gravitation / pb_2corps_part2_animation.tex
1
2 \documentclass{article}
3 \usepackage[a4paper,margin=2cm]{geometry}
4 \usepackage{pst-eqdf,pst-node,pst-tools}
5 \usepackage{animate}
6 \pagestyle{empty}
7 %timeline
8 \begin{filecontents}{pb2corps.dat}
9 ::0x0
10 ::1
11 ::2
12 ::3
13 ::4
14 ::5
15 ::6
16 ::7
17 ::8
18 ::9
19 ::10
20 ::11
21 ::12
22 ::13
23 ::14
24 ::15
25 ::16
26 ::17
27 ::18
28 ::19
29 ::20
30 ::21
31 ::22
32 ::23
33 ::24
34 ::25
35 ::26
36 ::27
37 ::28
38 ::29
39 ::30
40 ::31
41 ::32
42 ::33
43 ::34
44 ::35
45 ::36
46 ::37
47 ::38
48 ::39
49 ::40
50 ::41
51 ::42
52 ::43
53 ::44
54 ::45
55 ::46
56 ::47
57 ::48
58 ::49
59 ::50
60 ::51
61 ::52
62 ::53
63 ::54
64 ::55
65 ::56
66 ::57
67 ::58
68 ::59
69 ::60
70 ::61
71 ::62
72 ::63
73 ::64
74 ::65
75 ::66
76 ::67
77 ::68
78 ::69
79 ::70
80 ::71
81 ::72
82 ::73
83 ::74
84 ::75
85 ::76
86 ::77
87 ::78
88 ::79
89 ::80
90 ::81
91 ::82
92 ::83
93 ::84
94 ::85
95 ::86
96 ::87
97 ::88
98 ::89
99 ::90
100 ::91
101 ::92
102 ::93
103 ::94
104 ::95
105 ::96
106 ::97
107 ::98
108 ::99
109 ::100
110 ::101
111 ::102
112 ::103
113 ::104
114 ::105
115 ::106
116 ::107
117 ::108
118 ::109
119 ::110
120 ::111
121 ::112
122 ::113
123 ::114
124 ::115
125 ::116
126 ::117
127 ::118
128 ::119
129 ::120
130 ::121
131 ::122
132 ::123
133 ::124
134 ::125
135 ::126
136 ::127
137 ::128
138 ::129
139 ::130
140 ::131
141 ::132
142 ::133
143 ::134
144 ::135
145 ::136
146 ::137
147 ::138
148 ::139
149 ::140
150 ::141
151 ::142
152 ::143
153 ::144
154 ::145
155 ::146
156 ::147
157 ::148
158 ::149
159 ::150
160 ::151
161 ::152
162 ::153
163 ::154
164 ::155
165 ::156
166 ::157
167 ::158
168 ::159
169 ::160
170 ::161
171 ::162
172 ::163
173 ::164
174 ::165
175 ::166
176 ::167
177 ::168
178 ::169
179 ::170
180 ::171
181 ::172
182 ::173
183 ::174
184 ::175
185 ::176
186 ::177
187 ::178
188 ::179
189 ::180
190 ::181
191 ::182
192 ::183
193 ::184
194 ::185
195 ::186
196 ::187
197 ::188
198 ::189
199 ::190
200 ::191
201 ::192
202 ::193
203 ::194
204 ::195
205 ::196
206 ::197
207 ::198
208 ::199
209 ::200
210 \end{filecontents}
211 %%%%%%%%%%%%%%%%%%
212 \title{Gravitation : le problème des deux corps avec PSTricks\\ partie 2}
213 \date{5 juillet 2\,012}
214 \begin{document}
215 \begin{center}
216 \pstVerb{/XY1 [(XYM1.dat) run] def
217 /XY2 [(XYM2.dat) run] def
218 /XYG [(XYG.dat) run] def}%
219 \def\nFrames{200}% 200 images
220 \begin{animateinline}[controls,loop,timeline=pb2corps.dat,%
221 begin={\begin{pspicture}(-4,-5)(13,12)},
222 end={\end{pspicture}}]{10}% 10 images/s
223 \psframe*(-4,-5)(13,12)
224 \psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=0pt]%
225 \listplot[linecolor=gray]{XY1 aload pop}
226 \listplot[linecolor=gray]{XY2 aload pop}
227 \listplot[linecolor=gray]{XYG aload pop}
228 \newframe
229 \multiframe{\nFrames}{i=0+10,I=2+10}{% 1 point sur 10
230 \pstVerb{/X1 XY1 \i\space get def
231 /Y1 XY1 \i\space 1 add get def
232 /X2 XY2 \i\space get def
233 /Y2 XY2 \i\space 1 add get def
234 /XG XYG \i\space get def
235 /YG XYG \i\space 1 add get def
236 /xy1 [
237 0 2 \I\space {/i exch def
238 XY1 i get
239 XY1 i 1 add get
240 } for
241 ] def
242 /xy2 [
243 0 2 \I\space {/i exch def
244 XY2 i get
245 XY2 i 1 add get
246 } for
247 ] def
248 /xyG [
249 0 2 \I\space {/i exch def
250 XYG i get
251 XYG i 1 add get
252 } for
253 ] def
254 }%
255 \psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=0pt]%
256 \listplot[linecolor=red]{xy1 aload pop}
257 \listplot[linecolor=blue!50]{xy2 aload pop}
258 \listplot[linecolor=yellow]{xyG aload pop}
259 \pscircle*[linecolor=red](!X1 Y1){0.3}
260 \pscircle*[linecolor=blue!50](!X2 Y2){0.1}
261 \pscircle*[linecolor=yellow](!XG YG){0.05}
262 %\psline[linestyle=dashed,linecolor=white](!X1 Y1)(!X2 Y2)
263 }
264 \end{animateinline}
265 \end{center}
266 \end{document}

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.