PstMap3d: solstice_ete_globe_tellure_Syracuse.tex

File solstice_ete_globe_tellure_Syracuse.tex, 3.4 kB (added by manuel, 10 months ago)

globe tellure pour l'été à Syracuse (Italie)

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,ombre=false}
9 \newpsstyle{ShadowGlobe}{fillstyle=solid,fillcolor=BlueDark,linecolor=BlueDark,opacity=0.8}
10 \makeatletter
11 \def\psGlobeTellure{\pst@object{psGlobeTellure}}
12 \def\psGlobeTellure@i(#1,#2)#3{% longitude, latitude et nom de la ville
13    \pst@killglue
14    \begingroup
15    \begin@SpecialObj%
16     \pnode(!/ux 0 def /uy 90 #2 sub sin def /uz 90 #2 sub cos def 0 0){ttt}%
17     \psset{PHI=0,THETA=0}%
18     {\psset{RotX=#2 90 sub,RotZ=90 #1 add}
19     \WorldMapThreeD[style=Globe,ombre=false]%
20     \mapputIIID(#1,#2){#3}}%
21    \WorldMapThreeD[style=ShadowGlobe,ombre=true,circles=false,blueEarth=false,
22                          borders=false,islands=false,
23                          rivers=false,lakes=false,
24                          gridmap=false,latitudeParallel=#2]%
25    \psframe*(-3,-6.5)(3,-5.5)
26    \rput(! 0 \psk@TroisD@Radius\space neg -1 add){\white\psk@WorldMap@hour h le \psk@WorldMap@J/\psk@WorldMap@M/\psk@WorldMap@A}
27    \end@SpecialObj%
28    \endgroup%
29    \ignorespaces}%
30
31 \newdimen\pssizeStar
32 \def\psset@sizeStar#1{\pssetlength\pssizeStar{#1}}
33 \psset@sizeStar{1.5pt}
34
35 %% adapté de \psRandom du package pstricks-add
36 %% pour rendre aléatoire la taille des étoiles
37 \def\psRandomStar{\pst@object{psRandomStar}}%
38 \def\psRandomStar@i{\@ifnextchar({\psRandomStar@ii}{\psRandomStar@iii(0,0)(1,1)}}
39 \def\psRandomStar@ii(#1){\@ifnextchar({\psRandomStar@iii(#1)}{\psRandomStar@iii(0,0)(#1)}}
40 \def\psRandomStar@iii(#1)(#2)#3{%
41   \def\pst@tempA{#3}%
42   \ifx\pst@tempA\pst@empty\psclip{\psframe(#2)}\else\psclip{#3}\fi
43   \pst@getcoor{#1}\pst@tempA
44   \pst@getcoor{#2}\pst@tempB
45   \begin@SpecialObj
46   \addto@pscode{
47     \pst@tempA\space /yMin exch def
48     /xMin exch def
49     \pst@tempB\space /yMax exch def
50     /xMax exch def
51     /dy yMax yMin sub def
52     /dx xMax xMin sub def
53     rrand srand                 % initializes the random generator
54     /getRandReal { rand 2147483647 div } def
55      \psk@randomPoints {
56     /DS \pst@number\pssizeStar\space getRandReal mul def
57     \@nameuse{psds@\psk@dotstyle}
58      \ifPst@color getRandReal 1 1 sethsbcolor \fi
59      getRandReal dx mul xMin add
60      getRandReal dy mul yMin add
61      Dot
62      \ifx\psk@fillstyle\psfs@solid fill \fi stroke
63     } repeat
64   }%
65   \end@SpecialObj
66   \endpsclip
67   \ignorespaces
68 }
69 \makeatother
70 \begin{document}
71 \psset{Radius=5,Decran=100,Dobs=100,unit=0.5}
72 \begin{center}
73 \multido{\i=0+2,\ih=1+2}{12}{%
74 \begin{pspicture}(-7,-7)(7,7)
75 \psframe*[linecolor=BlueDark](-7,-7)(7,7)%
76 \psRandomStar[linecolor=yellow!50,randomPoints=100](-7,-7)(7,7){\psframe(-7,-7)(7,7)}
77 %\psline(-9;39.93)(8;39.93)
78 %\rput(-9;39.93){\psline(3,0)\psarc{->}(0,0){2}{0}{39.93}\uput[20](2;20){39.93}}
79 \psGlobeTellure[hour=\i,Day=22,Month=06,Year=2008](15.28,37.07){Syracuse}
80 \end{pspicture}
81 \hfill
82 \begin{pspicture}(-7,-7)(7,7)
83 \psframe*[linecolor=BlueDark](-7,-7)(7,7)%
84 \psRandomStar[linecolor=yellow!50,randomPoints=100](-7,-7)(7,7){\psframe(-7,-7)(7,7)}
85 %\psline(-9;39.93)(8;39.93)
86 %\rput(-9;39.93){\psline(3,0)\psarc{->}(0,0){2}{0}{39.93}\uput[20](2;20){39.93}}
87 \psGlobeTellure[hour=\ih,Day=22,Month=06,Year=2008](15.28,37.07){Syracuse}
88 \end{pspicture}
89 \newline}
90 \end{center}
91 \end{document}
92
93