Debian Codegraph @

texmf-dist/dvips/pst-nutation/pst-nutation.pro

raw
1 %% $Id: pst-nutation.pro 1198 2025-12-20 13:27:56Z herbert $
2 %%
3 %% This is file `pst-nutation.pro',
4 %%
5 %% Jürgen Gilg & Manuel Luque & Herbert Voß <[email protected]>
6 %%
7 %% This program can be redistributed and/or modified under the terms
8 %% of the LaTeX Project Public License Distributed from CTAN archives
9 %% in directory macros/latex/base/lppl.txt.
10 %%
11 %% version 0.01 / 2025-12-20
12 %
13 /pst-parallel {
14 /TabPtsParallel [
15 0 1 360{
16 /latitude exch def
17 [
18 r latitude cos mul phi cos mul
19 r latitude sin mul phi cos mul
20 r phi sin mul
21 ]
22 } for
23 ] def
24 gsave
25 Parallele
26 grestore
27 } def
28
29 /Parallele {
30 linecolor
31 linestyle
32 solidlinewidth setlinewidth
33 0 1 TabPtsParallel length 2 sub {/i exch def
34 TabPtsParallel i get aload pop /Point1 defpoint3d
35 TabPtsParallel i 1 add get aload pop /Point2 defpoint3d
36 Point1
37 GetCamPos
38 vecteur3d
39 Point1 scalprod3d 0 gt
40 Point2
41 GetCamPos
42 vecteur3d
43 Point2 scalprod3d 0 gt and {
44 Point1 3dto2d xunit mul exch xunit mul exch moveto
45 Point2 3dto2d xunit mul exch xunit mul exch lineto
46 stroke
47 } if
48 } for
49 projectionsifacevisible {
50 0 3 TabPtsParallel length 3 sub {/i exch def
51 TabPtsParallel i get aload pop /Point1 defpoint3d
52 Point1
53 GetCamPos
54 vecteur3d
55 Point1 scalprod3d 0 le
56 {
57 Point1 3dto2d xunit mul exch xunit mul exch solidlinewidth 2 div 0 360 arc fill
58 } if
59 } for
60 }if
61 } def
62
63 /pst-meridian {
64 /TabPtsMeridian [
65 0 1 360{
66 /longitude exch def
67 [
68 r theta cos mul longitude cos mul
69 r theta sin mul longitude cos mul
70 r longitude sin mul
71 ]
72 } for
73 ] def
74 gsave
75 Meridian
76 grestore
77 } def
78
79 /Meridian {
80 linecolor
81 linestyle
82 solidlinewidth setlinewidth
83 0 1 TabPtsMeridian length 2 sub {/i exch def
84 TabPtsMeridian i get aload pop /Point1 defpoint3d
85 TabPtsMeridian i 1 add get aload pop /Point2 defpoint3d
86 Point1
87 GetCamPos
88 vecteur3d
89 Point1 scalprod3d 0 gt
90 Point2
91 GetCamPos
92 vecteur3d
93 Point2 scalprod3d 0 gt and {
94 Point1 3dto2d xunit mul exch xunit mul exch moveto
95 Point2 3dto2d xunit mul exch xunit mul exch lineto
96 stroke
97 } if
98 } for
99 projectionsifacevisible {
100 0 2 TabPtsMeridian length 2 sub {/i exch def
101 TabPtsMeridian i get aload pop /Point1 defpoint3d
102 Point1
103 GetCamPos
104 vecteur3d
105 Point1 scalprod3d 0 le
106 {
107 Point1 3dto2d xunit mul exch xunit mul exch solidlinewidth 2 div 0 360 arc fill
108 } if
109 } for
110 } if
111 } def