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

Revision 57, 2.0 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{styleNight}{fillstyle=solid,fillcolor=black,linecolor=black,opacity=0.8}
10 \makeatletter
11 \newdimen\pssizeStar
12 \def\psset@sizeStar#1{\pssetlength\pssizeStar{#1}}
13 \psset@sizeStar{1.5pt}
14
15 %% adapté de \psRandom du package pstricks-add
16 %% pour rendre aléatoire la taille des étoiles
17 \def\psRandomStar{\pst@object{psRandomStar}}%
18 \def\psRandomStar@i{\@ifnextchar({\psRandomStar@ii}{\psRandomStar@iii(0,0)(1,1)}}
19 \def\psRandomStar@ii(#1){\@ifnextchar({\psRandomStar@iii(#1)}{\psRandomStar@iii(0,0)(#1)}}
20 \def\psRandomStar@iii(#1)(#2)#3{%
21   \def\pst@tempA{#3}%
22   \ifx\pst@tempA\pst@empty\psclip{\psframe(#2)}\else\psclip{#3}\fi
23   \pst@getcoor{#1}\pst@tempA
24   \pst@getcoor{#2}\pst@tempB
25   \begin@SpecialObj
26   \addto@pscode{
27     \pst@tempA\space /yMin exch def
28     /xMin exch def
29     \pst@tempB\space /yMax exch def
30     /xMax exch def
31     /dy yMax yMin sub def
32     /dx xMax xMin sub def
33     rrand srand                 % initializes the random generator
34     /getRandReal { rand 2147483647 div } def
35      \psk@randomPoints {
36     /DS \pst@number\pssizeStar\space getRandReal mul def
37     \@nameuse{psds@\psk@dotstyle}
38      \ifPst@color getRandReal 1 1 sethsbcolor \fi
39      getRandReal dx mul xMin add
40      getRandReal dy mul yMin add
41      Dot
42      \ifx\psk@fillstyle\psfs@solid fill \fi stroke
43     } repeat
44   }%
45   \end@SpecialObj
46   \endpsclip
47   \ignorespaces
48 }
49 \makeatother
50 \begin{document}
51 \psset{Radius=5,Decran=100,Dobs=100}
52 \begin{center}
53 \begin{pspicture}(-7,-8)(7,6)
54 \psframe(-7,-8)(7,6)
55 \psline(-10;48.85)(8;48.85)
56 \rput(-10;48.85){\psline(3,0)\psarc{->}(0,0){2}{0}{48.85}\uput[24.4](2;24.4){48.85}}
57 \psGlobeTellure[hour=9,Day=22,Month=06,Year=2008](2.32,48.85000){Paris}
58 \end{pspicture}
59 \end{center}
60 \end{document}
61
62
Note: See TracBrowser for help on using the browser.