summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-geo/pst-map3dII.tex
blob: 6728202d4a5623b1c44ce1979d0fd575503275ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
%%
%% This is file `pst-map3dII.tex',
%%
%% IMPORTANT NOTICE:
%%
%% Package `pst-map3dII.tex'
%%
%% Manuel Luque <Mluque5130@aol.com> (France)
%% Giuseppe Matarazzo  <joematara@hotmail.com> (Italy)
%% Herbert Voss  <voss@perce.de> (Germany)
%%
%% May 09, 2004
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   `pst-map3dII' is a PSTricks package to create geographical objects
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\csname PSTMapThreeDII\endcsname
\let\PSTMapThreeDII\endinput

% Require PSTricks
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey\fi

\def\fileversion{0.26}
\def\filedate{2009/08/28}

\message{`PST-mapThreeDII v\fileversion, \filedate\space (ML/GM/HV)}
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\pst@addfams{pst-map3dII}
\pstheader{pst-map3dII.pro}
\SpecialCoor
%
\define@key[psset]{pst-map3dII}{path}{\edef\psk@WorldMap@Path{#1}} % chemin des données
\psset{path=.}
%
\define@key[psset]{pst-map3dII}{RotX}{\def\psk@TroisD@RotX{#1}} % rotation autour de Ox en degrés
\define@key[psset]{pst-map3dII}{RotY}{\def\psk@TroisD@RotY{#1}} % rotation autour de Oy en degrés
\define@key[psset]{pst-map3dII}{RotZ}{\def\psk@TroisD@RotZ{#1}} % rotation autour de OZ en degrés
\define@key[psset]{pst-map3dII}{Radius}{\def\psk@TroisD@Radius{#1}} % rayon de la sphère
%
\define@key[psset]{pst-map3dII}{THETA}{\def\psk@TroisD@Theta{#1}}
\define@key[psset]{pst-map3dII}{PHI}{\def\psk@TroisD@Phi{#1}}
\define@key[psset]{pst-map3dII}{Dobs}{\def\psk@TroisD@Dobs{#1}}
\define@key[psset]{pst-map3dII}{Decran}{\def\psk@TroisD@Ecran{#1}}
\psset{THETA=0,PHI=45,Dobs=20,Decran=25,Radius=5}
\psset{RotX=0,RotY=0,RotZ=0}
%
\define@key[psset]{pst-map3dII}{increment}{\def\psk@WorldMapII@increment{#1}}
\psset{increment=10}
%
\define@key[psset]{pst-map3dII}{level}{\def\psk@WorldMapII@level{#1}}% hv 2004-05-05
\psset{level=5}
%
\def\geo@variablesIIID{%
    /RotX \psk@TroisD@RotX\space def
    /RotY \psk@TroisD@RotY\space def
    /RotZ \psk@TroisD@RotZ\space def
    /THETA \psk@TroisD@Theta\space def
    /PHI \psk@TroisD@Phi\space def
    /Rsphere \psk@TroisD@Radius\space def
    /Dobs \psk@TroisD@Dobs\space def
    /DScreen \psk@TroisD@Ecran\space def
    /step \psk@WorldMapII@level\space def
 }%
 %
\newif\ifPst@WorldMap@capitals
\define@key[psset]{pst-map3dII}{capital}[false]{\@nameuse{Pst@WorldMap@capitals#1}}
\psset{capital=false}
%
\newif\ifPst@WorldMap@city
\define@key[psset]{pst-map3dII}{city}[false]{\@nameuse{Pst@WorldMap@city#1}}
\psset{city=false}
%
\newif\ifPst@WorldMap@maillage
\define@key[psset]{pst-map3dII}{maillage}[true]{\@nameuse{Pst@WorldMap@maillage#1}}
\psset{maillage=true}
%
\newif\ifPst@WorldMapII@Rivers
\define@key[psset]{pst-map3dII}{rivers}[true]{\@nameuse{Pst@WorldMapII@Rivers#1}}
\psset{rivers=true}
%
\newif\ifPst@WorldMapII@Borders
\define@key[psset]{pst-map3dII}{borders}[true]{\@nameuse{Pst@WorldMapII@Borders#1}}
\psset{borders=true}
%
\newif\ifPst@WorldMap@Europe
\define@key[psset]{pst-map3dII}{europe}[true]{\@nameuse{Pst@WorldMap@Europe#1}}
\psset{europe=true}
%
\newif\ifPst@WorldMap@Asia
\define@key[psset]{pst-map3dII}{asia}[false]{\@nameuse{Pst@WorldMap@Asia#1}}
\psset{asia=false}
%
\newif\ifPst@WorldMap@Africa
\define@key[psset]{pst-map3dII}{africa}[false]{\@nameuse{Pst@WorldMap@Africa#1}}
\psset{africa=false}
%
\newif\ifPst@WorldMap@namer
\define@key[psset]{pst-map3dII}{namer}[false]{\@nameuse{Pst@WorldMap@namer#1}}
\psset{namer=false}
%
\newif\ifPst@WorldMap@samer
\define@key[psset]{pst-map3dII}{samer}[false]{\@nameuse{Pst@WorldMap@samer#1}}
\psset{samer=false}
%
\newif\ifPst@WorldMapII@all% hv 2004-05-05
\define@key[psset]{pst-map3dII}{all}[true]{%
  \psset{europe=true,asia=true,africa=true,namer=true,samer=true}
}
%
\def\WorldMapThreeDII{\pst@object{WorldMapThreeDII}}
\def\WorldMapThreeDII@i{\@ifnextchar[{\WorldMapThreeDII@do}{\WorldMapThreeDII@do[]}}
\def\WorldMapThreeDII@do[#1]{{%
  \psset{#1}%
  \begin@ClosedObj
  \addto@pscode{%
    \geo@variablesIIID
    1 setlinejoin
    0 0 translate
    /increment \psk@WorldMapII@increment\space def
    /xunit {\pst@number\psxunit\space mul}def
    /yunit {\pst@number\psyunit\space mul}def
    /runit {\pst@number\psrunit\space mul}def
    gsave
    newpath
    0.7 0.9 0.9 setrgbcolor
% cercle vu par l'observateur
    /RsphereScreen Rsphere DScreen mul Dobs div
      1 Rsphere dup mul Dobs dup mul div sub sqrt div runit def
    0 0 RsphereScreen 0 360 arc
    closepath
    fill
    grestore
    /condition {PSfacette 0 le} def
    /departPhi -90 def
    tx@mapII3DDict begin
      MatriceTransformation
      /Draw {
        { CalculsPoints
          stroke
        } forall
      }def
%
      /DrawRivers {
        { CalculsPoints
          gsave
          0 0 1 setrgbcolor
          CLW 0.25 mul
          stroke
          grestore
        } forall
      } def
%
      /DrawBdy {
        { CalculsPoints
          gsave
          1 0 0 setrgbcolor
          stroke
          grestore
        } forall
      } def
\ifPst@WorldMap@maillage
  MaillageSphere
\fi
\ifPst@WorldMap@Europe
    (\psk@WorldMap@Path/europe-cil.dat) run
 europe-cil
  Draw
 \ifPst@WorldMapII@Rivers
(\psk@WorldMap@Path/europe-riv.dat) run
  europe-riv
  DrawRivers
  \fi
 \ifPst@WorldMapII@Borders
(\psk@WorldMap@Path/europe-bdy.dat) run
 europe-bdy
 DrawBdy
 \fi
\fi
%
\ifPst@WorldMap@Africa
  (\psk@WorldMap@Path/africa-cil.dat) run
  africa-cil
  Draw
  \ifPst@WorldMapII@Rivers
    (\psk@WorldMap@Path/africa-riv.dat) run
    africa-riv
    DrawRivers
  \fi
  \ifPst@WorldMapII@Borders
    (\psk@WorldMap@Path/africa-bdy.dat) run
    africa-bdy
    DrawBdy
  \fi
\fi
%
\ifPst@WorldMap@Asia
  (\psk@WorldMap@Path/asia-cil.dat) run
  asia-cil
  Draw
  \ifPst@WorldMapII@Rivers
    (\psk@WorldMap@Path/asia-riv.dat) run
    asia-riv
    DrawRivers
  \fi
  \ifPst@WorldMapII@Borders
    (\psk@WorldMap@Path/asia-bdy.dat) run
    asia-bdy
    DrawBdy
  \fi
\fi
%
\ifPst@WorldMap@namer
(\psk@WorldMap@Path/namer-cil.dat) run
 namer-cil
  Draw
\ifPst@WorldMapII@Rivers
(\psk@WorldMap@Path/namer-riv.dat) run
  namer-riv
  DrawRivers
  \fi
\ifPst@WorldMapII@Borders
(\psk@WorldMap@Path/namer-bdy.dat) run
(\psk@WorldMap@Path/namer-pby.dat) run
 namer-bdy
  DrawBdy
 namer-pby
  DrawBdy
\fi
\fi
%
\ifPst@WorldMap@samer
(\psk@WorldMap@Path/samer-cil.dat) run
 samer-cil
  Draw
\ifPst@WorldMapII@Rivers
(\psk@WorldMap@Path/samer-riv.dat) run
  samer-riv
  DrawRivers
 \fi
\ifPst@WorldMapII@Borders
(\psk@WorldMap@Path/samer-bdy.dat) run
 samer-bdy
  DrawBdy
\fi
\fi
%
\ifPst@WorldMap@city
% les capitales
  (\psk@WorldMap@Path/c-cap.dat) run
  1.5 % rayon du point
  citycapitals
  DrawCitys
% les autres villes
  (\psk@WorldMap@Path/c-sub.dat) run
  0.5 % rayon du point
  CitySub
DrawCitys
\fi
\ifPst@WorldMap@capitals
% les capitales
  (\psk@WorldMap@Path/citycapitals.dat) run
  1.5
  citycapitals
  DrawCitys
\fi
end}%
\end@ClosedObj
}}
%
%
\catcode`\@=\PstAtCode\relax
\endinput