root/trunk/pst-map3d/exemples/solstice_summer_globe_tellure_Pekin.tex

Revision 57, 2.3 kB (checked in by jms, 10 months ago)

Réinjection des exemples et des datas dans des répertoires.

Line 
1 \documentclass{article}
2 \usepackage[T1]{fontenc}
3 \usepackage[latin1]{inputenc}
4 \usepackage[a4paper,margin=2cm]{geometry}
5 \usepackage{pstricks-add,pst-map3d}
6 \pagestyle{empty}
7 \definecolor{BlueDark}{cmyk}{1,1,0,0.5}
8 \newpsstyle{Globe}{circles=true,gridmap=true}
9 \newpsstyle{night}{fillstyle=solid,fillcolor=BlueDark,linecolor=BlueDark,opacity=0.8}
10
11 \makeatletter
12 \newdimen\pssizeStar
13 \def\psset@sizeStar#1{\pssetlength\pssizeStar{#1}}
14 \psset@sizeStar{1.5pt}
15
16 %% adapté de \psRandom du package pstricks-add
17 %% pour rendre aléatoire la taille des étoiles
18 \def\psRandomStar{\pst@object{psRandomStar}}%
19 \def\psRandomStar@i{\@ifnextchar({\psRandomStar@ii}{\psRandomStar@iii(0,0)(1,1)}}
20 \def\psRandomStar@ii(#1){\@ifnextchar({\psRandomStar@iii(#1)}{\psRandomStar@iii(0,0)(#1)}}
21 \def\psRandomStar@iii(#1)(#2)#3{%
22   \def\pst@tempA{#3}%
23   \ifx\pst@tempA\pst@empty\psclip{\psframe(#2)}\else\psclip{#3}\fi
24   \pst@getcoor{#1}\pst@tempA
25   \pst@getcoor{#2}\pst@tempB
26   \begin@SpecialObj
27   \addto@pscode{
28     \pst@tempA\space /yMin exch def
29     /xMin exch def
30     \pst@tempB\space /yMax exch def
31     /xMax exch def
32     /dy yMax yMin sub def
33     /dx xMax xMin sub def
34     rrand srand                 % initializes the random generator
35     /getRandReal { rand 2147483647 div } def
36      \psk@randomPoints {
37     /DS \pst@number\pssizeStar\space getRandReal mul def
38     \@nameuse{psds@\psk@dotstyle}
39      \ifPst@color getRandReal 1 1 sethsbcolor \fi
40      getRandReal dx mul xMin add
41      getRandReal dy mul yMin add
42      Dot
43      \ifx\psk@fillstyle\psfs@solid fill \fi stroke
44     } repeat
45   }%
46   \end@SpecialObj
47   \endpsclip
48   \ignorespaces
49 }
50 \makeatother
51 \begin{document}
52 \psset{Radius=5,Decran=100,Dobs=100,unit=0.5}
53 \begin{center}
54 \multido{\i=0+2,\ih=1+2}{12}{%
55 \begin{pspicture}(-7,-8)(7,6)
56 \psframe(-7,-8)(7,6)
57 \psline(-9;39.93)(8;39.93)
58 \rput(-9;39.93){\psline(3,0)\psarc{->}(0,0){2}{0}{39.93}\uput[20](2;20){39.93}}
59 \psGlobeTellure[hour=\i,Day=22,Month=06,Year=2008](116.4,39.9333333333){Beijing}
60 \end{pspicture}
61 \hfill
62 \begin{pspicture}(-7,-8)(7,6)
63 \psframe(-7,-8)(7,6)
64 \psline(-9;39.93)(8;39.93)
65 \rput(-9;39.93){\psline(3,0)\psarc{->}(0,0){2}{0}{39.93}\uput[20](2;20){39.93}}
66 \psGlobeTellure[hour=\ih,Day=22,Month=06,Year=2008](116.4,39.9333333333){Beijing}
67 \end{pspicture}
68 \newline}
69 \end{center}
70 \end{document}
71
72
Note: See TracBrowser for help on using the browser.