Contents of file 'poincare/example-d.mp':
1 % This Filename: example-d.mp [MetaPost source]
2 % Creation time: Thu Jan 23 20:19:33 2014
3 %
4 % Copyright (C) 1997-2005, Fredrik Jonsson <fj@optics.kth.se>
5 %
6 % Input Filename [Stokes parameters]: example-d.dat
7 % This MetaPost source code was automatically generated by poincare
8 % Full set of command line options that generated this code:
9 % --verbose --normalize --bezier --inputfile example-d.dat --outputfile
10 % example-d.mp --axislengths 0.3 1.7 0.3 2.4
11 % 0.3 1.5 --axislabels s_1(t) bot s_2(t)
12 % bot s_3(t) rt --rotatephi 15.0 --rotatepsi
13 % -60.0 --shading 0.75 0.99 --rhodivisor 50
14 % --phidivisor 80 --scalefactor 20.0 --paththickness 0.8
15 % --arrowthickness 0.4 --arrowheadangle 30.0 --draw_paths_as_arrows --arrow
16 % 1.0 0.7 -0.58 1.0 0.7 0.15
17 % 0 0.9 --arrow 0.28 0.9 0.52
18 % 0.3 0.9 1.5 0 0.9
19 %
20 % Description: Map of Stokes parameters, visualized as trajectories
21 % onto the Poincare sphere. This file contains MetaPost
22 % source code, to be compiled with John Hobby's MetaPost
23 % compiler or used with anything that understands MetaPost
24 % source code.
25 %
26 % If you want to create PostScript output, or include the resulting
27 % output in a TeX document, this example illustrates the procedure,
28 % assuming 'poincaremap.mp' to be the name of the file containing the
29 % MetaPost code to be visualized: (commands run on command-line)
30 %
31 % mp poincaremap.mp;
32 % echo "\input epsf\centerline{\epsfbox{poincaremap.1}}\bye" > tmp.tex;
33 % tex tmp.tex;
34 % dvips tmp.dvi -o poincaremap.ps;
35 %
36 % Here, the first command compiles the MetaPost source code, and leaves
37 % an Encapsulated PostScript file named 'poincaremap.1', containing TeX
38 % control codes for characters, etc. This file does not contain any
39 % definitions for characters or TeX-specific items, and it cannot be
40 % viewed or printed simply as is stands; it must rather be included into
41 % TeX code in order to provide something useful.
42 % The second command creates a temporary minimal TeX-file 'tmp.tex',
43 % that only includes the previously generated Encapsulated PostScript
44 % code.
45 % The third command compiles the TeX-code into device-independent,
46 % or DVI, output, stored in the file 'tmp.dvi'.
47 % Finally, the last command converts the DVI output into a free-
48 % standing PostScript file 'poincaremap.ps', to be printed or viewed
49 % with some PostScript viewer, such as GhostView.
50 %
51 scalefactor := 20.000000 mm;
52 rot_psi := -60.000000; % Rotation angle round z-axis (first rotation)
53 rot_phi := 15.000000; % Rotation angle round y-axis (second rotation)
54 alpha := -24.146108; % == arctan(sin(rot_phi)*tan(rot_psi))
55 beta := -8.498781; % == arctan(sin(rot_phi)/tan(rot_psi))
56
57 %
58 % Parameters specifying the location of the light source; for Phong
59 % shading of the sphere.
60 %
61 % phi_source: Angle (in deg.) to light source counterclockwise
62 % 'from three o'clock', viewed from the observer.
63 %
64 % theta_source: Angle (in deg.) between light source and observer,
65 % seen from the centre of the sphere.
66 %
67 % Parameters specifying the shading 'intensity' in terms of maximum
68 % (for the highlighs) and minimum (for the deep shadowed regions)
69 % values for the Phong shading. '0.0' <=> 'black'; '1.0' <=> 'white'
70 %
71 % upper_value: Maximum value of whiteness.
72 % lower_value: Minimum value of whiteness.
73 %
74 phi_source := 30.000000;
75 theta_source := 30.000000;
76 upper_value := 0.990000;
77 lower_value := 0.750000;
78 radius := scalefactor;
79 delta_rho := radius/50.000000;
80 delta_phi := 360.0/80.000000;
81 beginfig(1);
82 path p;
83 path equator;
84 transform T;
85 c1:=lower_value;
86 c2:=upper_value-lower_value;
87 nx_source := sind(theta_source)*cosd(phi_source);
88 ny_source := sind(theta_source)*sind(phi_source);
89 nz_source := cosd(theta_source);
90 phistop := 360.0;
91 rhostop := radius - delta_rho/2.0;
92 %
93 % Draw the shaded Poincare sphere projected on 2D screen coordinates
94 %
95 for rho=0.0cm step delta_rho until rhostop:
96 for phi=0.0 step delta_phi until phistop:
97 rhomid := rho + delta_rho/2.0;
98 phimid := phi + delta_phi/2.0;
99 x1 := rho*cosd(phi);
100 y1 := rho*sind(phi);
101 x2 := (rho+delta_rho)*cosd(phi);
102 y2 := (rho+delta_rho)*sind(phi);
103 x3 := (rho+delta_rho)*cosd(phi+delta_phi);
104 y3 := (rho+delta_rho)*sind(phi+delta_phi);
105 x4 := rho*cosd(phi+delta_phi);
106 y4 := rho*sind(phi+delta_phi);
107 p:=makepath makepen ((x1,y1)--(x2,y2)--(x3,y3)--(x4,y4)--(x1,y1));
108 quot := (rhomid/radius);
109 nx_object := quot*cosd(phimid);
110 ny_object := quot*sind(phimid);
111 nz_object := sqrt(1-quot*quot);
112 prod:=nx_object*nx_source+ny_object*ny_source
113 +nz_object*nz_source;
114 if prod < 0.0:
115 value := c1;
116 else:
117 value := c1 + c2*prod*prod;
118 fi
119 fill p withcolor value[black,white];
120 endfor
121 endfor
122
123 %
124 % Draw the 'equators' of the Poincare sphere
125 %
126 equator := halfcircle scaled (2.0*radius);
127 eqcolval := .45; % '0.0' <=> 'white'; '1.0' <=> 'black'
128
129 pickup pencircle scaled 0.600000 pt;
130 %
131 % Draw equator $S_3=0$...
132 %
133 T := identity yscaled sind(rot_phi) rotated 180.0;
134 draw equator transformed T withcolor eqcolval [white,black];
135
136 %
137 % ... then equator $S_2=0$...
138 %
139 T := identity yscaled (cosd(rot_phi)*sind(rot_psi))
140 rotated (270.0 + alpha);
141 draw equator transformed T withcolor eqcolval [white,black];
142
143 %
144 % ... and finally equator $S_1=0$.
145 %
146 T := identity yscaled (cosd(rot_phi)*cosd(rot_psi))
147 rotated (270.0 - beta);
148 draw equator transformed T withcolor eqcolval [white,black];
149
150 oldahangle:=ahangle;
151 ahangle:=30.000000;
152 pickup pencircle scaled 0.800000 pt;
153 pickup pencircle scaled 0.800000 pt;
154 p := makepath makepen (0.6179,-0.7858)..(0.6468,-0.7602)
155 ..(0.6643,-0.7405)..(0.6692,-0.7285)..(0.6612,-0.7247)
156 ..(0.6412,-0.7283)..(0.6115,-0.7376)..(0.5749,-0.7498)
157 ..(0.5357,-0.7622)..(0.4979,-0.7722)..(0.4651,-0.7777)
158 ..(0.4397,-0.7771)..(0.4223,-0.7693)..(0.4119,-0.7539)
159 ..(0.4060,-0.7310)..(0.4009,-0.7018)..(0.3933,-0.6684)
160 ..(0.3802,-0.6339)..(0.3594,-0.6020)..(0.3306,-0.5764)
161 ..(0.2941,-0.5603)..(0.2513,-0.5554)..(0.2044,-0.5619)
162 ..(0.1555,-0.5785)..(0.1072,-0.6024)..(0.0615,-0.6302)
163 ..(0.0194,-0.6579)..(-0.0185,-0.6821)..(-0.0532,-0.7003)
164 ..(-0.0865,-0.7107)..(-0.1205,-0.7125)..(-0.1573,-0.7060)
165 ..(-0.1986,-0.6920)..(-0.2443,-0.6723)..(-0.2939,-0.6497)
166 ..(-0.3453,-0.6273)..(-0.3958,-0.6088)..(-0.4424,-0.5975)
167 ..(-0.4825,-0.5958)..(-0.5138,-0.6048)..(-0.5349,-0.6241)
168 ..(-0.5452,-0.6517)..(-0.5452,-0.6848)..(-0.5370,-0.7196)
169 ..(-0.5237,-0.7527)..(-0.5094,-0.7814)..(-0.4980,-0.8039)
170 ..(-0.4932,-0.8197)..(-0.4969,-0.8286)..(-0.5092,-0.8313)
171 ..(-0.5286,-0.8287)..(-0.5519,-0.8221)..(-0.5749,-0.8131)
172 ..(-0.5935,-0.8038);
173 draw p scaled radius withcolor 0.650000 [black,white];
174 pickup pencircle scaled 0.400000 pt;
175 label.urt(btex $(\vartheta=0.6)$ etex,(0.293901,-0.913190)*radius);
176 pickup pencircle scaled 0.800000 pt;
177 p := makepath makepen (0.9869,-0.1557)..(0.9774,-0.1753)
178 ..(0.9585,-0.2079)..(0.9303,-0.2473)..(0.8947,-0.2868)
179 ..(0.8552,-0.3196)..(0.8160,-0.3403)..(0.7802,-0.3449)
180 ..(0.7494,-0.3311)..(0.7226,-0.2984)..(0.6972,-0.2488)
181 ..(0.6695,-0.1858)..(0.6364,-0.1155)..(0.5959,-0.0453)
182 ..(0.5480,0.0172)..(0.4934,0.0655)..(0.4340,0.0945)
183 ..(0.3709,0.1018)..(0.3049,0.0872)..(0.2370,0.0531)
184 ..(0.1681,0.0040)..(0.0994,-0.0537)..(0.0325,-0.1124)
185 ..(-0.0317,-0.1648)..(-0.0934,-0.2044)..(-0.1534,-0.2270)
186 ..(-0.2137,-0.2303)..(-0.2760,-0.2144)..(-0.3409,-0.1818)
187 ..(-0.4080,-0.1366)..(-0.4755,-0.0853)..(-0.5412,-0.0351)
188 ..(-0.6033,0.0068)..(-0.6604,0.0341)..(-0.7122,0.0422)
189 ..(-0.7584,0.0289)..(-0.7984,-0.0056)..(-0.8310,-0.0586)
190 ..(-0.8546,-0.1251)..(-0.8688,-0.1984)..(-0.8746,-0.2708)
191 ..(-0.8749,-0.3353)..(-0.8737,-0.3862)..(-0.8750,-0.4204)
192 ..(-0.8815,-0.4363)..(-0.8932,-0.4343)..(-0.9079,-0.4166);
193 draw p scaled radius withcolor 0.650000 [black,white];
194 pickup pencircle scaled 0.400000 pt;
195 label.urt(btex $(\vartheta=1.3)$ etex,(0.475533,-0.511636)*radius);
196 pickup pencircle scaled 0.800000 pt;
197 p := makepath makepen (0.9217,0.3867)..(0.9303,0.3496)
198 ..(0.9304,0.3118)..(0.9207,0.2797)..(0.9016,0.2596)
199 ..(0.8742,0.2561)..(0.8396,0.2716)..(0.7984,0.3059)
200 ..(0.7506,0.3560)..(0.6962,0.4168)..(0.6364,0.4814)
201 ..(0.5730,0.5430)..(0.5089,0.5955)..(0.4466,0.6345)
202 ..(0.3874,0.6578)..(0.3310,0.6643)..(0.2760,0.6541)
203 ..(0.2202,0.6288)..(0.1616,0.5904)..(0.0994,0.5433)
204 ..(0.0338,0.4931)..(-0.0342,0.4464)..(-0.1032,0.4097)
205 ..(-0.1720,0.3882)..(-0.2395,0.3844)..(-0.3050,0.3986)
206 ..(-0.3670,0.4281)..(-0.4243,0.4679)..(-0.4755,0.5116)
207 ..(-0.5205,0.5529)..(-0.5604,0.5858)..(-0.5977,0.6061)
208 ..(-0.6357,0.6111)..(-0.6769,0.5993)..(-0.7226,0.5702)
209 ..(-0.7719,0.5250)..(-0.8218,0.4663)..(-0.8688,0.3986)
210 ..(-0.9095,0.3284)..(-0.9419,0.2629)..(-0.9653,0.2088)
211 ..(-0.9804,0.1715)..(-0.9877,0.1537);
212 draw p scaled radius withcolor 0.650000 [black,white];
213 pickup pencircle scaled 0.400000 pt;
214 label.urt(btex $(\vartheta=1.9)$ etex,(0.475533,0.085285)*radius);
215 pickup pencircle scaled 0.800000 pt;
216 p := makepath makepen (0.6040,0.7968)..(0.6040,0.7942)
217 ..(0.5923,0.7979)..(0.5689,0.8084)..(0.5349,0.8252)
218 ..(0.4924,0.8469)..(0.4441,0.8708)..(0.3933,0.8945)
219 ..(0.3431,0.9157)..(0.2963,0.9329)..(0.2546,0.9455)
220 ..(0.2183,0.9535)..(0.1866,0.9571)..(0.1573,0.9567)
221 ..(0.1282,0.9522)..(0.0968,0.9441)..(0.0615,0.9327)
222 ..(0.0216,0.9195)..(-0.0224,0.9062)..(-0.0691,0.8949)
223 ..(-0.1165,0.8874)..(-0.1623,0.8848)..(-0.2043,0.8874)
224 ..(-0.2408,0.8942)..(-0.2706,0.9035)..(-0.2939,0.9132)
225 ..(-0.3117,0.9216)..(-0.3262,0.9272)..(-0.3407,0.9293)
226 ..(-0.3583,0.9271)..(-0.3815,0.9205)..(-0.4119,0.9088)
227 ..(-0.4494,0.8918)..(-0.4920,0.8697)..(-0.5370,0.8433)
228 ..(-0.5802,0.8145);
229 draw p scaled radius withcolor 0.650000 [black,white];
230 pickup pencircle scaled 0.400000 pt;
231 label.urt(btex $(\vartheta=2.5)$ etex,(0.293901,0.649686)*radius);
232 ahangle:=oldahangle;
233 oldahangle:=ahangle;
234 ahangle:=30.000000;
235 pickup pencircle scaled 0.800000 pt;
236 pickup pencircle scaled 0.800000 pt;
237 p := makepath makepen (0.2939,-0.9132)..(0.3117,-0.9216)
238 ..(0.3262,-0.9272)..(0.3407,-0.9293)..(0.3583,-0.9271)
239 ..(0.3815,-0.9205)..(0.4119,-0.9088)..(0.4494,-0.8918)
240 ..(0.4920,-0.8697)..(0.5370,-0.8433)..(0.5802,-0.8145)
241 ..(0.6179,-0.7858);
242 draw p scaled radius withcolor black;
243 pickup pencircle scaled 0.800000 pt;
244 p := makepath makepen (-0.5935,-0.8038)..(-0.6040,-0.7968)
245 ..(-0.6040,-0.7942)..(-0.5923,-0.7979)..(-0.5689,-0.8084)
246 ..(-0.5349,-0.8252)..(-0.4924,-0.8469)..(-0.4441,-0.8708)
247 ..(-0.3933,-0.8945)..(-0.3431,-0.9157)..(-0.2963,-0.9329)
248 ..(-0.2546,-0.9455)..(-0.2183,-0.9535)..(-0.1866,-0.9571)
249 ..(-0.1573,-0.9567)..(-0.1282,-0.9522)..(-0.0968,-0.9441)
250 ..(-0.0615,-0.9327)..(-0.0216,-0.9195)..(0.0224,-0.9062)
251 ..(0.0691,-0.8949)..(0.1165,-0.8874)..(0.1623,-0.8848)
252 ..(0.2043,-0.8874)..(0.2408,-0.8942)..(0.2706,-0.9035)
253 ..(0.2939,-0.9132);
254 drawarrow p scaled radius withcolor black;
255 pickup pencircle scaled 0.400000 pt;
256 label.urt(btex $(\vartheta=0.6)$ etex,(0.293901,-0.913190)*radius);
257 pickup pencircle scaled 0.800000 pt;
258 p := makepath makepen (0.4755,-0.5116)..(0.5205,-0.5529)
259 ..(0.5604,-0.5858)..(0.5977,-0.6061)..(0.6357,-0.6111)
260 ..(0.6769,-0.5993)..(0.7226,-0.5702)..(0.7719,-0.5250)
261 ..(0.8218,-0.4663)..(0.8688,-0.3986)..(0.9095,-0.3284)
262 ..(0.9419,-0.2629)..(0.9653,-0.2088)..(0.9804,-0.1715)
263 ..(0.9877,-0.1537)..(0.9869,-0.1557);
264 draw p scaled radius withcolor black;
265 pickup pencircle scaled 0.800000 pt;
266 p := makepath makepen (-0.9079,-0.4166)..(-0.9217,-0.3867)
267 ..(-0.9303,-0.3496)..(-0.9304,-0.3118)..(-0.9207,-0.2797)
268 ..(-0.9016,-0.2596)..(-0.8742,-0.2561)..(-0.8396,-0.2716)
269 ..(-0.7984,-0.3059)..(-0.7506,-0.3560)..(-0.6962,-0.4168)
270 ..(-0.6364,-0.4814)..(-0.5730,-0.5430)..(-0.5089,-0.5955)
271 ..(-0.4466,-0.6345)..(-0.3874,-0.6578)..(-0.3310,-0.6643)
272 ..(-0.2760,-0.6541)..(-0.2202,-0.6288)..(-0.1616,-0.5904)
273 ..(-0.0994,-0.5433)..(-0.0338,-0.4931)..(0.0342,-0.4464)
274 ..(0.1032,-0.4097)..(0.1720,-0.3882)..(0.2395,-0.3844)
275 ..(0.3050,-0.3986)..(0.3670,-0.4281)..(0.4243,-0.4679)
276 ..(0.4755,-0.5116);
277 drawarrow p scaled radius withcolor black;
278 pickup pencircle scaled 0.400000 pt;
279 label.urt(btex $(\vartheta=1.3)$ etex,(0.475533,-0.511636)*radius);
280 pickup pencircle scaled 0.800000 pt;
281 p := makepath makepen (0.4755,0.0853)..(0.5412,0.0351)
282 ..(0.6033,-0.0068)..(0.6604,-0.0341)..(0.7122,-0.0422)
283 ..(0.7584,-0.0289)..(0.7984,0.0056)..(0.8310,0.0586)
284 ..(0.8546,0.1251)..(0.8688,0.1984)..(0.8746,0.2708)
285 ..(0.8749,0.3353)..(0.8737,0.3862)..(0.8750,0.4204)
286 ..(0.8815,0.4363)..(0.8932,0.4343)..(0.9079,0.4166)
287 ..(0.9217,0.3867);
288 draw p scaled radius withcolor black;
289 pickup pencircle scaled 0.800000 pt;
290 p := makepath makepen (-0.9877,0.1537)..(-0.9869,0.1557)
291 ..(-0.9774,0.1753)..(-0.9585,0.2079)..(-0.9303,0.2473)
292 ..(-0.8947,0.2868)..(-0.8552,0.3196)..(-0.8160,0.3403)
293 ..(-0.7802,0.3449)..(-0.7494,0.3311)..(-0.7226,0.2984)
294 ..(-0.6972,0.2488)..(-0.6695,0.1858)..(-0.6364,0.1155)
295 ..(-0.5959,0.0453)..(-0.5480,-0.0172)..(-0.4934,-0.0655)
296 ..(-0.4340,-0.0945)..(-0.3709,-0.1018)..(-0.3049,-0.0872)
297 ..(-0.2370,-0.0531)..(-0.1681,-0.0040)..(-0.0994,0.0537)
298 ..(-0.0325,0.1124)..(0.0317,0.1648)..(0.0934,0.2044)
299 ..(0.1534,0.2270)..(0.2137,0.2303)..(0.2760,0.2144)
300 ..(0.3409,0.1818)..(0.4080,0.1366)..(0.4755,0.0853);
301 drawarrow p scaled radius withcolor black;
302 pickup pencircle scaled 0.400000 pt;
303 label.urt(btex $(\vartheta=1.9)$ etex,(0.475533,0.085285)*radius);
304 pickup pencircle scaled 0.800000 pt;
305 p := makepath makepen (0.2939,0.6497)..(0.3453,0.6273)
306 ..(0.3958,0.6088)..(0.4424,0.5975)..(0.4825,0.5958)
307 ..(0.5138,0.6048)..(0.5349,0.6241)..(0.5452,0.6517)
308 ..(0.5452,0.6848)..(0.5370,0.7196)..(0.5237,0.7527)
309 ..(0.5094,0.7814)..(0.4980,0.8039)..(0.4932,0.8197)
310 ..(0.4969,0.8286)..(0.5092,0.8313)..(0.5286,0.8287)
311 ..(0.5519,0.8221)..(0.5749,0.8131)..(0.5935,0.8038)
312 ..(0.6040,0.7968);
313 draw p scaled radius withcolor black;
314 pickup pencircle scaled 0.800000 pt;
315 p := makepath makepen (-0.5802,0.8145)..(-0.6179,0.7858)
316 ..(-0.6468,0.7602)..(-0.6643,0.7405)..(-0.6692,0.7285)
317 ..(-0.6612,0.7247)..(-0.6412,0.7283)..(-0.6115,0.7376)
318 ..(-0.5749,0.7498)..(-0.5357,0.7622)..(-0.4979,0.7722)
319 ..(-0.4651,0.7777)..(-0.4397,0.7771)..(-0.4223,0.7693)
320 ..(-0.4119,0.7539)..(-0.4060,0.7310)..(-0.4009,0.7018)
321 ..(-0.3933,0.6684)..(-0.3802,0.6339)..(-0.3594,0.6020)
322 ..(-0.3306,0.5764)..(-0.2941,0.5603)..(-0.2513,0.5554)
323 ..(-0.2044,0.5619)..(-0.1555,0.5785)..(-0.1072,0.6024)
324 ..(-0.0615,0.6302)..(-0.0194,0.6579)..(0.0185,0.6821)
325 ..(0.0532,0.7003)..(0.0865,0.7107)..(0.1205,0.7125)
326 ..(0.1573,0.7060)..(0.1986,0.6920)..(0.2443,0.6723)
327 ..(0.2939,0.6497);
328 drawarrow p scaled radius withcolor black;
329 pickup pencircle scaled 0.400000 pt;
330 label.urt(btex $(\vartheta=2.5)$ etex,(0.293901,0.649686)*radius);
331 ahangle:=oldahangle;
332 %
333 % Draw the paths of the arrows specified by the user.
334 %
335 pickup pencircle scaled 0.5pt;
336 p := makepath makepen
337 (-0.381833,-0.626402)..(-0.383762,-0.618065)
338 ..(-0.385658,-0.609605)
339 ..(-0.387520,-0.601024)
340 ..(-0.389346,-0.592324)
341 ..(-0.391134,-0.583505)
342 ..(-0.392884,-0.574569)
343 ..(-0.394594,-0.565519)
344 ..(-0.396263,-0.556356)
345 ..(-0.397890,-0.547082)
346 ..(-0.399473,-0.537701)
347 ..(-0.401012,-0.528214)
348 ..(-0.402505,-0.518624)
349 ..(-0.403950,-0.508934)
350 ..(-0.405348,-0.499146)
351 ..(-0.406697,-0.489265)
352 ..(-0.407995,-0.479292)
353 ..(-0.409243,-0.469232)
354 ..(-0.410439,-0.459088)
355 ..(-0.411582,-0.448864)
356 ..(-0.412672,-0.438562)
357 ..(-0.413708,-0.428189)
358 ..(-0.414690,-0.417746)
359 ..(-0.415616,-0.407238)
360 ..(-0.416486,-0.396670)
361 ..(-0.417301,-0.386045);
362 drawarrow p scaled radius withcolor 0.900000 [white,black];
363 p := makepath makepen
364 (-0.417301,-0.386045)..(-0.418059,-0.375368)
365 ..(-0.418760,-0.364643)
366 ..(-0.419405,-0.353874)
367 ..(-0.419992,-0.343067)
368 ..(-0.420523,-0.332225)
369 ..(-0.420996,-0.321353)
370 ..(-0.421412,-0.310456)
371 ..(-0.421771,-0.299538)
372 ..(-0.422073,-0.288603)
373 ..(-0.422319,-0.277657)
374 ..(-0.422508,-0.266703)
375 ..(-0.422642,-0.255747)
376 ..(-0.422721,-0.244792)
377 ..(-0.422744,-0.233843)
378 ..(-0.422714,-0.222904)
379 ..(-0.422630,-0.211980)
380 ..(-0.422493,-0.201075)
381 ..(-0.422303,-0.190193)
382 ..(-0.422063,-0.179338)
383 ..(-0.421771,-0.168514)
384 ..(-0.421430,-0.157725)
385 ..(-0.421041,-0.146974)
386 ..(-0.420603,-0.136266)
387 ..(-0.420119,-0.125604)
388 ..(-0.419588,-0.114992);
389 draw p scaled radius withcolor 0.900000 [white,black];
390 p := makepath makepen
391 (0.192771,0.245539)..(0.191524,0.254864)
392 ..(0.190253,0.264210)
393 ..(0.188958,0.273573)
394 ..(0.187640,0.282952)
395 ..(0.186297,0.292344)
396 ..(0.184931,0.301745)
397 ..(0.183542,0.311152)
398 ..(0.182130,0.320564)
399 ..(0.180694,0.329977)
400 ..(0.179235,0.339387)
401 ..(0.177754,0.348792)
402 ..(0.176251,0.358190)
403 ..(0.174725,0.367576)
404 ..(0.173178,0.376948)
405 ..(0.171609,0.386302)
406 ..(0.170020,0.395636)
407 ..(0.168409,0.404947)
408 ..(0.166779,0.414231)
409 ..(0.165128,0.423485)
410 ..(0.163459,0.432707)
411 ..(0.161770,0.441893)
412 ..(0.160063,0.451040)
413 ..(0.158337,0.460145)
414 ..(0.156595,0.469206)
415 ..(0.154835,0.478219);
416 drawarrow p scaled radius withcolor 0.900000 [white,black];
417 p := makepath makepen
418 (0.154835,0.478219)..(0.153059,0.487182)
419 ..(0.151268,0.496091)
420 ..(0.149461,0.504944)
421 ..(0.147639,0.513738)
422 ..(0.145804,0.522471)
423 ..(0.143955,0.531140)
424 ..(0.142094,0.539743)
425 ..(0.140220,0.548276)
426 ..(0.138335,0.556738)
427 ..(0.136439,0.565126)
428 ..(0.134533,0.573439)
429 ..(0.132617,0.581673)
430 ..(0.130693,0.589827)
431 ..(0.128761,0.597900)
432 ..(0.126821,0.605888)
433 ..(0.124874,0.613791)
434 ..(0.122922,0.621607)
435 ..(0.120963,0.629334)
436 ..(0.119001,0.636970)
437 ..(0.117034,0.644515)
438 ..(0.115063,0.651966)
439 ..(0.113090,0.659324)
440 ..(0.111115,0.666586)
441 ..(0.109139,0.673752)
442 ..(0.107161,0.680820);
443 draw p scaled radius withcolor 0.900000 [white,black];
444 %
445 % Draw the $S_1$-, $S_2$- and $S_3$-axis of the Poincare sphere.
446 % First of all, calculate the transformations of the intersections
447 % for the unity sphere.
448 %
449 % Used variables:
450 %
451 % behind_distance : Specifies the relative distance of the coordi-
452 % axes to be plotted behind origo (in negative di-
453 % rection of respective axis.
454 %
455 % outside_distance_s1 : The relative distance from origo to the point
456 % of the arrow head of the coordinate axis S1.
457 % If this is set to 1.0, the arrow head will
458 % point directly at the Poincare sphere.
459 %
460 % outside_distance_s2 : Same as above, except that this one controls
461 % the S2 coordinate axis instead.
462 %
463 % outside_distance_s3 : Same as above, except that this one controls
464 % the S3 coordinate axis instead.
465 %
466 % insidecolval : Specifies the shade of gray to use for the parts
467 % of the coordinate axes that are inside the Poin-
468 % care sphere. Values must be between 0 and 1,
469 % where: '0.0' <=> 'white'; '1.0' <=> 'black'
470 %
471 behind_distance_s1 := -0.300000;
472 behind_distance_s2 := -0.300000;
473 behind_distance_s3 := -0.300000;
474 outside_distance_s1 := 1.700000;
475 outside_distance_s2 := 2.400000;
476 outside_distance_s3 := 1.500000;
477 insidecolval := .85; % '0.0' <=> 'white'; '1.0' <=> 'black'
478
479 pickup pencircle scaled 0.600000 pt;
480 %
481 % Start with drawing the x-axis...
482 %
483 x_bis_start := radius*behind_distance_s1*cosd(rot_psi)*cosd(rot_phi);
484 y_bis_start := radius*behind_distance_s1*sind(rot_psi);
485 z_bis_start := -radius*behind_distance_s1*cosd(rot_psi)*sind(rot_phi);
486 x_bis_intersect := radius*cosd(rot_psi)*cosd(rot_phi);
487 y_bis_intersect := radius*sind(rot_psi);
488 z_bis_intersect := -radius*cosd(rot_psi)*sind(rot_phi);
489 p := makepath makepen (y_bis_intersect,z_bis_intersect)--
490 (outside_distance_s1*y_bis_intersect,
491 outside_distance_s1*z_bis_intersect);
492 drawarrow p;
493 label.bot(btex $s_1(t)$ etex,
494 (outside_distance_s1*y_bis_intersect,
495 outside_distance_s1*z_bis_intersect));
496
497 %
498 % ... then draw the y-axis ...
499 %
500 x_bis_start := -radius*behind_distance_s2*sind(rot_psi)*cosd(rot_phi);
501 y_bis_start := radius*behind_distance_s2*cosd(rot_psi);
502 z_bis_start := radius*behind_distance_s2*sind(rot_psi)*sind(rot_phi);
503 x_bis_intersect := -radius*sind(rot_psi)*cosd(rot_phi);
504 y_bis_intersect := radius*cosd(rot_psi);
505 z_bis_intersect := radius*sind(rot_psi)*sind(rot_phi);
506 p := makepath makepen (y_bis_intersect,z_bis_intersect)--
507 (outside_distance_s2*y_bis_intersect,
508 outside_distance_s2*z_bis_intersect);
509 drawarrow p;
510 label.bot(btex $s_2(t)$ etex,
511 (outside_distance_s2*y_bis_intersect,
512 outside_distance_s2*z_bis_intersect));
513
514 %
515 % ... then, finally, draw the z-axis.
516 %
517 x_bis_start := radius*behind_distance_s3*sind(rot_phi);
518 y_bis_start := 0.0;
519 z_bis_start := radius*behind_distance_s3*cosd(rot_phi);
520 x_bis_intersect := radius*sind(rot_phi);
521 y_bis_intersect := 0.0;
522 z_bis_intersect := radius*cosd(rot_phi);
523 p := makepath makepen (y_bis_intersect,z_bis_intersect)--
524 (outside_distance_s3*y_bis_intersect,
525 outside_distance_s3*z_bis_intersect);
526 drawarrow p;
527 label.rt(btex $s_3(t)$ etex,
528 (outside_distance_s3*y_bis_intersect,
529 outside_distance_s3*z_bis_intersect));
530
531 endfig;
532 end
533
Generated by ::viewsrc::