2 \documentclass{article
}
3 \usepackage[a4paper,margin=
2cm
]{geometry
}
4 \usepackage[T1]{fontenc}
5 \usepackage[latin1]{inputenc}%
6 \usepackage[garamond
]{mathdesign
}
7 \usepackage{pstricks,pst-eqdf,pst-node
}
9 \newpsstyle{vecteurA
}{arrowinset=
0.05,arrowsize=
0.1,linecolor=
{[rgb
]{1 0.5 0}}}
10 \newpsstyle{vecteurB
}{arrowinset=
0.05,arrowsize=
0.1,linecolor=
{[rgb
]{0 0.5 1}}}
11 \newpsstyle{vecteurC
}{arrowinset=
0.1,arrowsize=
0.2,linecolor=
{[rgb
]{1 0 0}}}
13 \begin{filecontents
}{kepler16.dat
}
218 %% adapté de \psRandom du package pstricks-add
219 %% pour rendre aléatoire la taille des étoiles
222 \def\psset@sizeStar
#1{\pssetlength\pssizeStar{#1}}
224 \define@key
[psset
]{pst-eqd
}{randomPoints
}[1000]{\def\psk@randomPoints
{#1}}
225 \psset[pst-eqd
]{randomPoints=
1000}
226 \define@boolkey
[psset
]{pst-eqd
}[Pst@
]{color}[true
]{}
227 \psset[pst-eqd
]{color=false
}
228 \def\psRandomStar{\pst@object
{psRandomStar
}}%
229 \def\psRandomStar@i
{\@ifnextchar(
{\psRandomStar@ii
}{\psRandomStar@iii(
0,
0)(
1,
1)
}}
230 \def\psRandomStar@ii(
#1)
{\@ifnextchar(
{\psRandomStar@iii(
#1)
}{\psRandomStar@iii(
0,
0)(
#1)
}}
231 \def\psRandomStar@iii(
#1)(
#2)
#3{%
233 \ifx\pst@tempA
\pst@empty
\psclip{\psframe(
#2)
}\else\psclip{#3}\fi
234 \pst@getcoor
{#1}\pst@tempA
235 \pst@getcoor
{#2}\pst@tempB
238 \pst@tempA
\space /yMin exch def
240 \pst@tempB
\space /yMax exch def
242 /dy yMax yMin sub def
243 /dx xMax xMin sub def
244 rrand srand
% initializes the random generator
245 /getRandReal
{ rand
2147483647 div
} def
247 /DS
\pst@number
\pssizeStar\space getRandReal mul def
248 \@nameuse
{psds@
\psk@dotstyle
}
249 \ifPst@
color getRandReal
1 1 sethsbcolor
\fi
250 getRandReal dx mul xMin add
251 getRandReal dy mul yMin add
253 \ifx\psk@fillstyle
\psfs@solid fill
\fi stroke
261 %%%%%%%%%%%%%%%%%%%%%%%
262 \title{Gravitation : une planète à deux soleils comme Tatooine celle de Luke Skywalker dans La Guerre des étoiles
}
263 \date{10 juillet
2\,
012}
266 \pstVerb{/XY1
[(XAYA.dat) run
] def
267 /XY2
[(XBYB.dat) run
] def
268 /XY3
[(XPYP.dat) run
] def
270 \def\nFrames{200}% 200 images
271 \begin{animateinline
}[controls,timeline=kepler16.dat,loop,
%
272 begin=
{\begin{pspicture
}(-
8,-
8)(
8,
8)
},
273 end=
{\end{pspicture
}}]{5}% 5 images/s
274 \psframe*
[linecolor=
{[cmyk
]{1 1 0 0.7}}](-
8,-
8)(
8,
8)
275 \psRandomStar[linecolor=
{[rgb
]{1,
1,
0.5}},
276 randomPoints=
1000,sizeStar=
1pt
](-
8,-
8)(
8,
8)
{\psframe[linestyle=none
](-
8,-
8)(
8,
8)
}
277 %\listplot[linecolor=gray]{XY1 aload pop}
278 %\listplot[linecolor=gray]{XY2 aload pop}
279 %\listplot[linecolor=gray]{XY3 aload pop}
281 \multiframe{\nFrames}{i=
0+
10}{% 1 point sur 10
282 \pstVerb{/X1 XY1
\i\space get def
283 /Y1 XY1
\i\space 1 add get def
284 /X2 XY2
\i\space get def
285 /Y2 XY2
\i\space 1 add get def
286 /X3 XY3
\i\space get def
287 /Y3 XY3
\i\space 1 add get def
290 \pscircle*
[linecolor=yellow
](!X1 Y1)
{0.5}
291 \pscircle*
[linecolor=red
](!X2 Y2)
{0.2}
292 \pscircle*
[linecolor=white
](!X3 Y3)
{0.07}