% This Filename: example-d.mp [MetaPost source] % Creation time: Fri Dec 16 19:30:16 2011 % % Copyright (C) 1997-2005, Fredrik Jonsson % % Input Filename [Stokes parameters]: example-d.dat % This MetaPost source code was automatically generated by poincare % Full set of command line options that generated this code: % --verbose --normalize --bezier --inputfile example-d.dat --outputfile % example-d.mp --axislengths 0.3 1.7 0.3 2.4 % 0.3 1.5 --axislabels s_1(t) bot s_2(t) % bot s_3(t) rt --rotatephi 15.0 --rotatepsi % -60.0 --shading 0.75 0.99 --rhodivisor 50 % --phidivisor 80 --scalefactor 20.0 --paththickness 0.8 % --arrowthickness 0.4 --arrowheadangle 30.0 --draw_paths_as_arrows --arrow % 1.0 0.7 -0.58 1.0 0.7 0.15 % 0 0.9 --arrow 0.28 0.9 0.52 % 0.3 0.9 1.5 0 0.9 % % Description: Map of Stokes parameters, visualized as trajectories % onto the Poincare sphere. This file contains MetaPost % source code, to be compiled with John Hobby's MetaPost % compiler or used with anything that understands MetaPost % source code. % % If you want to create PostScript output, or include the resulting % output in a TeX document, this example illustrates the procedure, % assuming 'poincaremap.mp' to be the name of the file containing the % MetaPost code to be visualized: (commands run on command-line) % % mp poincaremap.mp; % echo "\input epsf\centerline{\epsfbox{poincaremap.1}}\bye" > tmp.tex; % tex tmp.tex; % dvips tmp.dvi -o poincaremap.ps; % % Here, the first command compiles the MetaPost source code, and leaves % an Encapsulated PostScript file named 'poincaremap.1', containing TeX % control codes for characters, etc. This file does not contain any % definitions for characters or TeX-specific items, and it cannot be % viewed or printed simply as is stands; it must rather be included into % TeX code in order to provide something useful. % The second command creates a temporary minimal TeX-file 'tmp.tex', % that only includes the previously generated Encapsulated PostScript % code. % The third command compiles the TeX-code into device-independent, % or DVI, output, stored in the file 'tmp.dvi'. % Finally, the last command converts the DVI output into a free- % standing PostScript file 'poincaremap.ps', to be printed or viewed % with some PostScript viewer, such as GhostView. % scalefactor := 20.000000 mm; rot_psi := -60.000000; % Rotation angle round z-axis (first rotation) rot_phi := 15.000000; % Rotation angle round y-axis (second rotation) alpha := -24.146108; % == arctan(sin(rot_phi)*tan(rot_psi)) beta := -8.498781; % == arctan(sin(rot_phi)/tan(rot_psi)) % % Parameters specifying the location of the light source; for Phong % shading of the sphere. % % phi_source: Angle (in deg.) to light source counterclockwise % 'from three o'clock', viewed from the observer. % % theta_source: Angle (in deg.) between light source and observer, % seen from the centre of the sphere. % % Parameters specifying the shading 'intensity' in terms of maximum % (for the highlighs) and minimum (for the deep shadowed regions) % values for the Phong shading. '0.0' <=> 'black'; '1.0' <=> 'white' % % upper_value: Maximum value of whiteness. % lower_value: Minimum value of whiteness. % phi_source := 30.000000; theta_source := 30.000000; upper_value := 0.990000; lower_value := 0.750000; radius := scalefactor; delta_rho := radius/50.000000; delta_phi := 360.0/80.000000; beginfig(1); path p; path equator; transform T; c1:=lower_value; c2:=upper_value-lower_value; nx_source := sind(theta_source)*cosd(phi_source); ny_source := sind(theta_source)*sind(phi_source); nz_source := cosd(theta_source); phistop := 360.0; rhostop := radius - delta_rho/2.0; % % Draw the shaded Poincare sphere projected on 2D screen coordinates % for rho=0.0cm step delta_rho until rhostop: for phi=0.0 step delta_phi until phistop: rhomid := rho + delta_rho/2.0; phimid := phi + delta_phi/2.0; x1 := rho*cosd(phi); y1 := rho*sind(phi); x2 := (rho+delta_rho)*cosd(phi); y2 := (rho+delta_rho)*sind(phi); x3 := (rho+delta_rho)*cosd(phi+delta_phi); y3 := (rho+delta_rho)*sind(phi+delta_phi); x4 := rho*cosd(phi+delta_phi); y4 := rho*sind(phi+delta_phi); p:=makepath makepen ((x1,y1)--(x2,y2)--(x3,y3)--(x4,y4)--(x1,y1)); quot := (rhomid/radius); nx_object := quot*cosd(phimid); ny_object := quot*sind(phimid); nz_object := sqrt(1-quot*quot); prod:=nx_object*nx_source+ny_object*ny_source +nz_object*nz_source; if prod < 0.0: value := c1; else: value := c1 + c2*prod*prod; fi fill p withcolor value[black,white]; endfor endfor % % Draw the 'equators' of the Poincare sphere % equator := halfcircle scaled (2.0*radius); eqcolval := .45; % '0.0' <=> 'white'; '1.0' <=> 'black' pickup pencircle scaled 0.600000 pt; % % Draw equator $S_3=0$... % T := identity yscaled sind(rot_phi) rotated 180.0; draw equator transformed T withcolor eqcolval [white,black]; % % ... then equator $S_2=0$... % T := identity yscaled (cosd(rot_phi)*sind(rot_psi)) rotated (270.0 + alpha); draw equator transformed T withcolor eqcolval [white,black]; % % ... and finally equator $S_1=0$. % T := identity yscaled (cosd(rot_phi)*cosd(rot_psi)) rotated (270.0 - beta); draw equator transformed T withcolor eqcolval [white,black]; oldahangle:=ahangle; ahangle:=30.000000; pickup pencircle scaled 0.800000 pt; pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.4651,-0.8849)..(-0.4979,-0.8661) ..(-0.5357,-0.8418)..(-0.5749,-0.8131)..(-0.6115,-0.7820) ..(-0.6412,-0.7515)..(-0.6612,-0.7246)..(-0.6692,-0.7042) ..(-0.6643,-0.6922)..(-0.6468,-0.6891)..(-0.6179,-0.6941) ..(-0.5802,-0.7051)..(-0.5370,-0.7196)..(-0.4920,-0.7343) ..(-0.4494,-0.7465)..(-0.4119,-0.7539)..(-0.3815,-0.7547) ..(-0.3583,-0.7480)..(-0.3407,-0.7334)..(-0.3262,-0.7111) ..(-0.3117,-0.6824)..(-0.2939,-0.6497)..(-0.3453,-0.6273) ..(-0.3958,-0.6088)..(-0.4424,-0.5975)..(-0.4825,-0.5958) ..(-0.5138,-0.6048)..(-0.5349,-0.6241)..(-0.5452,-0.6517) ..(-0.5452,-0.6848)..(-0.5370,-0.7196)..(-0.5237,-0.7527) ..(-0.5094,-0.7814)..(-0.4980,-0.8039)..(-0.4932,-0.8197) ..(-0.4969,-0.8286)..(-0.5092,-0.8313)..(-0.5286,-0.8287) ..(-0.5519,-0.8221)..(-0.5749,-0.8131)..(-0.5935,-0.8038); draw p scaled radius withcolor 0.650000 [black,white]; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=0.6)$ etex,(0.293901,-0.913190)*radius); pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.9869,-0.1557)..(-0.9877,-0.1179) ..(-0.9804,-0.1002)..(-0.9653,-0.1026)..(-0.9419,-0.1231) ..(-0.9095,-0.1570)..(-0.8688,-0.1984)..(-0.8218,-0.2401) ..(-0.7719,-0.2754)..(-0.7226,-0.2984)..(-0.6769,-0.3053) ..(-0.6357,-0.2934)..(-0.5977,-0.2625)..(-0.5604,-0.2146) ..(-0.5205,-0.1534)..(-0.4755,-0.0853)..(-0.5412,-0.0351) ..(-0.6033,0.0068)..(-0.6604,0.0341)..(-0.7122,0.0422) ..(-0.7584,0.0289)..(-0.7984,-0.0056)..(-0.8310,-0.0586) ..(-0.8546,-0.1251)..(-0.8688,-0.1984)..(-0.8746,-0.2708) ..(-0.8749,-0.3353)..(-0.8737,-0.3862)..(-0.8750,-0.4204) ..(-0.8815,-0.4363)..(-0.8932,-0.4343)..(-0.9079,-0.4166); draw p scaled radius withcolor 0.650000 [black,white]; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=1.3)$ etex,(0.475533,-0.511636)*radius); pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.8737,0.4823)..(-0.8749,0.4651) ..(-0.8746,0.4355)..(-0.8688,0.3986)..(-0.8546,0.3604) ..(-0.8310,0.3274)..(-0.7984,0.3059)..(-0.7584,0.3005) ..(-0.7122,0.3138)..(-0.6604,0.3455)..(-0.6033,0.3928) ..(-0.5412,0.4504)..(-0.4755,0.5116)..(-0.5205,0.5529) ..(-0.5604,0.5858)..(-0.5977,0.6061)..(-0.6357,0.6111) ..(-0.6769,0.5993)..(-0.7226,0.5702)..(-0.7719,0.5250) ..(-0.8218,0.4663)..(-0.8688,0.3986)..(-0.9095,0.3284) ..(-0.9419,0.2629)..(-0.9653,0.2088)..(-0.9804,0.1715) ..(-0.9877,0.1537); draw p scaled radius withcolor 0.650000 [black,white]; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=1.9)$ etex,(0.475533,0.085285)*radius); pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.5370,0.8433)..(-0.5452,0.8348) ..(-0.5452,0.8281)..(-0.5349,0.8253)..(-0.5138,0.8280) ..(-0.4825,0.8370)..(-0.4424,0.8518)..(-0.3958,0.8710) ..(-0.3453,0.8923)..(-0.2939,0.9132)..(-0.3117,0.9216) ..(-0.3262,0.9272)..(-0.3407,0.9293)..(-0.3583,0.9271) ..(-0.3815,0.9205)..(-0.4119,0.9088)..(-0.4494,0.8918) ..(-0.4920,0.8697)..(-0.5370,0.8433)..(-0.5802,0.8145); draw p scaled radius withcolor 0.650000 [black,white]; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=2.5)$ etex,(0.293901,0.649686)*radius); ahangle:=oldahangle; oldahangle:=ahangle; ahangle:=30.000000; pickup pencircle scaled 0.800000 pt; pickup pencircle scaled 0.800000 pt; p := makepath makepen (0.2939,-0.9132)..(0.2443,-0.9316) ..(0.1986,-0.9463)..(0.1573,-0.9567)..(0.1205,-0.9627) ..(0.0865,-0.9645)..(0.0532,-0.9624)..(0.0185,-0.9562) ..(-0.0194,-0.9462)..(-0.0615,-0.9327)..(-0.1072,-0.9172) ..(-0.1555,-0.9014)..(-0.2044,-0.8874)..(-0.2513,-0.8773) ..(-0.2941,-0.8724)..(-0.3306,-0.8729)..(-0.3594,-0.8779) ..(-0.3802,-0.8857)..(-0.3933,-0.8945)..(-0.4009,-0.9022) ..(-0.4060,-0.9073)..(-0.4119,-0.9088)..(-0.4223,-0.9059) ..(-0.4397,-0.8981)..(-0.4651,-0.8849); draw p scaled radius withcolor black; pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.5935,-0.8038)..(-0.6040,-0.7968) ..(-0.6040,-0.7942)..(-0.5923,-0.7979)..(-0.5689,-0.8084) ..(-0.5349,-0.8252)..(-0.4924,-0.8469)..(-0.4441,-0.8708) ..(-0.3933,-0.8945)..(-0.3431,-0.9157)..(-0.2963,-0.9329) ..(-0.2546,-0.9455)..(-0.2183,-0.9535)..(-0.1866,-0.9571) ..(-0.1573,-0.9567)..(-0.1282,-0.9522)..(-0.0968,-0.9441) ..(-0.0615,-0.9327)..(-0.0216,-0.9195)..(0.0224,-0.9062) ..(0.0691,-0.8949)..(0.1165,-0.8874)..(0.1623,-0.8848) ..(0.2043,-0.8874)..(0.2408,-0.8942)..(0.2706,-0.9035) ..(0.2939,-0.9132); drawarrow p scaled radius withcolor black; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=0.6)$ etex,(0.293901,-0.913190)*radius); pickup pencircle scaled 0.800000 pt; p := makepath makepen (0.4755,-0.5116)..(0.4080,-0.5697) ..(0.3409,-0.6186)..(0.2760,-0.6542)..(0.2137,-0.6741) ..(0.1534,-0.6775)..(0.0934,-0.6642)..(0.0317,-0.6356) ..(-0.0325,-0.5939)..(-0.0994,-0.5433)..(-0.1681,-0.4894) ..(-0.2370,-0.4391)..(-0.3049,-0.3986)..(-0.3709,-0.3734) ..(-0.4340,-0.3661)..(-0.4934,-0.3769)..(-0.5480,-0.4032) ..(-0.5959,-0.4402)..(-0.6364,-0.4814)..(-0.6695,-0.5205) ..(-0.6972,-0.5516)..(-0.7226,-0.5702)..(-0.7494,-0.5734) ..(-0.7802,-0.5596)..(-0.8160,-0.5283)..(-0.8552,-0.4808) ..(-0.8947,-0.4195)..(-0.9303,-0.3496)..(-0.9585,-0.2776) ..(-0.9774,-0.2107)..(-0.9869,-0.1557); draw p scaled radius withcolor black; pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.9079,-0.4166)..(-0.9217,-0.3867) ..(-0.9303,-0.3496)..(-0.9304,-0.3118)..(-0.9207,-0.2797) ..(-0.9016,-0.2596)..(-0.8742,-0.2561)..(-0.8396,-0.2716) ..(-0.7984,-0.3059)..(-0.7506,-0.3560)..(-0.6962,-0.4168) ..(-0.6364,-0.4814)..(-0.5730,-0.5430)..(-0.5089,-0.5955) ..(-0.4466,-0.6345)..(-0.3874,-0.6578)..(-0.3310,-0.6643) ..(-0.2760,-0.6541)..(-0.2202,-0.6288)..(-0.1616,-0.5904) ..(-0.0994,-0.5433)..(-0.0338,-0.4931)..(0.0342,-0.4464) ..(0.1032,-0.4097)..(0.1720,-0.3882)..(0.2395,-0.3844) ..(0.3050,-0.3986)..(0.3670,-0.4281)..(0.4243,-0.4679) ..(0.4755,-0.5116); drawarrow p scaled radius withcolor black; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=1.3)$ etex,(0.475533,-0.511636)*radius); pickup pencircle scaled 0.800000 pt; p := makepath makepen (0.4755,0.0853)..(0.4243,0.0176) ..(0.3670,-0.0421)..(0.3050,-0.0872)..(0.2395,-0.1128) ..(0.1720,-0.1165)..(0.1032,-0.0983)..(0.0342,-0.0604) ..(-0.0338,-0.0076)..(-0.0994,0.0537)..(-0.1616,0.1159) ..(-0.2202,0.1716)..(-0.2760,0.2144)..(-0.3310,0.2402) ..(-0.3874,0.2467)..(-0.4466,0.2341)..(-0.5089,0.2049) ..(-0.5730,0.1633)..(-0.6364,0.1155)..(-0.6962,0.0687) ..(-0.7506,0.0300)..(-0.7984,0.0056)..(-0.8396,0.0000) ..(-0.8742,0.0155)..(-0.9016,0.0518)..(-0.9207,0.1063) ..(-0.9304,0.1737)..(-0.9303,0.2473)..(-0.9217,0.3196) ..(-0.9079,0.3838)..(-0.8932,0.4343)..(-0.8815,0.4682) ..(-0.8750,0.4841)..(-0.8737,0.4823); draw p scaled radius withcolor black; pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.9877,0.1537)..(-0.9869,0.1557) ..(-0.9774,0.1753)..(-0.9585,0.2079)..(-0.9303,0.2473) ..(-0.8947,0.2868)..(-0.8552,0.3196)..(-0.8160,0.3403) ..(-0.7802,0.3449)..(-0.7494,0.3311)..(-0.7226,0.2984) ..(-0.6972,0.2488)..(-0.6695,0.1858)..(-0.6364,0.1155) ..(-0.5959,0.0453)..(-0.5480,-0.0172)..(-0.4934,-0.0655) ..(-0.4340,-0.0945)..(-0.3709,-0.1018)..(-0.3049,-0.0872) ..(-0.2370,-0.0531)..(-0.1681,-0.0040)..(-0.0994,0.0537) ..(-0.0325,0.1124)..(0.0317,0.1648)..(0.0934,0.2044) ..(0.1534,0.2270)..(0.2137,0.2303)..(0.2760,0.2144) ..(0.3409,0.1818)..(0.4080,0.1366)..(0.4755,0.0853); drawarrow p scaled radius withcolor black; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=1.9)$ etex,(0.475533,0.085285)*radius); pickup pencircle scaled 0.800000 pt; p := makepath makepen (0.2939,0.6497)..(0.2706,0.6162) ..(0.2408,0.5857)..(0.2043,0.5619)..(0.1623,0.5479) ..(0.1165,0.5454)..(0.0691,0.5545)..(0.0224,0.5736) ..(-0.0216,0.6001)..(-0.0615,0.6302)..(-0.0968,0.6600) ..(-0.1282,0.6861)..(-0.1573,0.7060)..(-0.1866,0.7181) ..(-0.2183,0.7217)..(-0.2546,0.7172)..(-0.2963,0.7055) ..(-0.3431,0.6883)..(-0.3933,0.6684)..(-0.4441,0.6488) ..(-0.4924,0.6330)..(-0.5349,0.6240)..(-0.5689,0.6243) ..(-0.5923,0.6348)..(-0.6040,0.6550)..(-0.6040,0.6830) ..(-0.5935,0.7158)..(-0.5749,0.7498)..(-0.5519,0.7820) ..(-0.5286,0.8096)..(-0.5092,0.8313)..(-0.4969,0.8466) ..(-0.4932,0.8555)..(-0.4980,0.8587)..(-0.5094,0.8570) ..(-0.5237,0.8514)..(-0.5370,0.8433); draw p scaled radius withcolor black; pickup pencircle scaled 0.800000 pt; p := makepath makepen (-0.5802,0.8145)..(-0.6179,0.7858) ..(-0.6468,0.7602)..(-0.6643,0.7405)..(-0.6692,0.7285) ..(-0.6612,0.7247)..(-0.6412,0.7283)..(-0.6115,0.7376) ..(-0.5749,0.7498)..(-0.5357,0.7622)..(-0.4979,0.7722) ..(-0.4651,0.7777)..(-0.4397,0.7771)..(-0.4223,0.7693) ..(-0.4119,0.7539)..(-0.4060,0.7310)..(-0.4009,0.7018) ..(-0.3933,0.6684)..(-0.3802,0.6339)..(-0.3594,0.6020) ..(-0.3306,0.5764)..(-0.2941,0.5603)..(-0.2513,0.5554) ..(-0.2044,0.5619)..(-0.1555,0.5785)..(-0.1072,0.6024) ..(-0.0615,0.6302)..(-0.0194,0.6579)..(0.0185,0.6821) ..(0.0532,0.7003)..(0.0865,0.7107)..(0.1205,0.7125) ..(0.1573,0.7060)..(0.1986,0.6920)..(0.2443,0.6723) ..(0.2939,0.6497); drawarrow p scaled radius withcolor black; pickup pencircle scaled 0.400000 pt; label.urt(btex $(\vartheta=2.5)$ etex,(0.293901,0.649686)*radius); ahangle:=oldahangle; % % Draw the paths of the arrows specified by the user. % pickup pencircle scaled 0.5pt; p := makepath makepen (-0.381833,-0.626402)..(-0.383762,-0.618065) ..(-0.385658,-0.609605) ..(-0.387520,-0.601024) ..(-0.389346,-0.592324) ..(-0.391134,-0.583505) ..(-0.392884,-0.574569) ..(-0.394594,-0.565519) ..(-0.396263,-0.556356) ..(-0.397890,-0.547082) ..(-0.399473,-0.537701) ..(-0.401012,-0.528214) ..(-0.402505,-0.518624) ..(-0.403950,-0.508934) ..(-0.405348,-0.499146) ..(-0.406697,-0.489265) ..(-0.407995,-0.479292) ..(-0.409243,-0.469232) ..(-0.410439,-0.459088) ..(-0.411582,-0.448864) ..(-0.412672,-0.438562) ..(-0.413708,-0.428189) ..(-0.414690,-0.417746) ..(-0.415616,-0.407238) ..(-0.416486,-0.396670) ..(-0.417301,-0.386045); drawarrow p scaled radius withcolor 0.900000 [white,black]; p := makepath makepen (-0.417301,-0.386045)..(-0.418059,-0.375368) ..(-0.418760,-0.364643) ..(-0.419405,-0.353874) ..(-0.419992,-0.343067) ..(-0.420523,-0.332225) ..(-0.420996,-0.321353) ..(-0.421412,-0.310456) ..(-0.421771,-0.299538) ..(-0.422073,-0.288603) ..(-0.422319,-0.277657) ..(-0.422508,-0.266703) ..(-0.422642,-0.255747) ..(-0.422721,-0.244792) ..(-0.422744,-0.233843) ..(-0.422714,-0.222904) ..(-0.422630,-0.211980) ..(-0.422493,-0.201075) ..(-0.422303,-0.190193) ..(-0.422063,-0.179338) ..(-0.421771,-0.168514) ..(-0.421430,-0.157725) ..(-0.421041,-0.146974) ..(-0.420603,-0.136266) ..(-0.420119,-0.125604) ..(-0.419588,-0.114992); draw p scaled radius withcolor 0.900000 [white,black]; p := makepath makepen (0.192771,0.245539)..(0.191524,0.254864) ..(0.190253,0.264210) ..(0.188958,0.273573) ..(0.187640,0.282952) ..(0.186297,0.292344) ..(0.184931,0.301745) ..(0.183542,0.311152) ..(0.182130,0.320564) ..(0.180694,0.329977) ..(0.179235,0.339387) ..(0.177754,0.348792) ..(0.176251,0.358190) ..(0.174725,0.367576) ..(0.173178,0.376948) ..(0.171609,0.386302) ..(0.170020,0.395636) ..(0.168409,0.404947) ..(0.166779,0.414231) ..(0.165128,0.423485) ..(0.163459,0.432707) ..(0.161770,0.441893) ..(0.160063,0.451040) ..(0.158337,0.460145) ..(0.156595,0.469206) ..(0.154835,0.478219); drawarrow p scaled radius withcolor 0.900000 [white,black]; p := makepath makepen (0.154835,0.478219)..(0.153059,0.487182) ..(0.151268,0.496091) ..(0.149461,0.504944) ..(0.147639,0.513738) ..(0.145804,0.522471) ..(0.143955,0.531140) ..(0.142094,0.539743) ..(0.140220,0.548276) ..(0.138335,0.556738) ..(0.136439,0.565126) ..(0.134533,0.573439) ..(0.132617,0.581673) ..(0.130693,0.589827) ..(0.128761,0.597900) ..(0.126821,0.605888) ..(0.124874,0.613791) ..(0.122922,0.621607) ..(0.120963,0.629334) ..(0.119001,0.636970) ..(0.117034,0.644515) ..(0.115063,0.651966) ..(0.113090,0.659324) ..(0.111115,0.666586) ..(0.109139,0.673752) ..(0.107161,0.680820); draw p scaled radius withcolor 0.900000 [white,black]; % % Draw the $S_1$-, $S_2$- and $S_3$-axis of the Poincare sphere. % First of all, calculate the transformations of the intersections % for the unity sphere. % % Used variables: % % behind_distance : Specifies the relative distance of the coordi- % axes to be plotted behind origo (in negative di- % rection of respective axis. % % outside_distance_s1 : The relative distance from origo to the point % of the arrow head of the coordinate axis S1. % If this is set to 1.0, the arrow head will % point directly at the Poincare sphere. % % outside_distance_s2 : Same as above, except that this one controls % the S2 coordinate axis instead. % % outside_distance_s3 : Same as above, except that this one controls % the S3 coordinate axis instead. % % insidecolval : Specifies the shade of gray to use for the parts % of the coordinate axes that are inside the Poin- % care sphere. Values must be between 0 and 1, % where: '0.0' <=> 'white'; '1.0' <=> 'black' % behind_distance_s1 := -0.300000; behind_distance_s2 := -0.300000; behind_distance_s3 := -0.300000; outside_distance_s1 := 1.700000; outside_distance_s2 := 2.400000; outside_distance_s3 := 1.500000; insidecolval := .85; % '0.0' <=> 'white'; '1.0' <=> 'black' pickup pencircle scaled 0.600000 pt; % % Start with drawing the x-axis... % x_bis_start := radius*behind_distance_s1*cosd(rot_psi)*cosd(rot_phi); y_bis_start := radius*behind_distance_s1*sind(rot_psi); z_bis_start := -radius*behind_distance_s1*cosd(rot_psi)*sind(rot_phi); x_bis_intersect := radius*cosd(rot_psi)*cosd(rot_phi); y_bis_intersect := radius*sind(rot_psi); z_bis_intersect := -radius*cosd(rot_psi)*sind(rot_phi); p := makepath makepen (y_bis_intersect,z_bis_intersect)-- (outside_distance_s1*y_bis_intersect, outside_distance_s1*z_bis_intersect); drawarrow p; label.bot(btex $s_1(t)$ etex, (outside_distance_s1*y_bis_intersect, outside_distance_s1*z_bis_intersect)); % % ... then draw the y-axis ... % x_bis_start := -radius*behind_distance_s2*sind(rot_psi)*cosd(rot_phi); y_bis_start := radius*behind_distance_s2*cosd(rot_psi); z_bis_start := radius*behind_distance_s2*sind(rot_psi)*sind(rot_phi); x_bis_intersect := -radius*sind(rot_psi)*cosd(rot_phi); y_bis_intersect := radius*cosd(rot_psi); z_bis_intersect := radius*sind(rot_psi)*sind(rot_phi); p := makepath makepen (y_bis_intersect,z_bis_intersect)-- (outside_distance_s2*y_bis_intersect, outside_distance_s2*z_bis_intersect); drawarrow p; label.bot(btex $s_2(t)$ etex, (outside_distance_s2*y_bis_intersect, outside_distance_s2*z_bis_intersect)); % % ... then, finally, draw the z-axis. % x_bis_start := radius*behind_distance_s3*sind(rot_phi); y_bis_start := 0.0; z_bis_start := radius*behind_distance_s3*cosd(rot_phi); x_bis_intersect := radius*sind(rot_phi); y_bis_intersect := 0.0; z_bis_intersect := radius*cosd(rot_phi); p := makepath makepen (y_bis_intersect,z_bis_intersect)-- (outside_distance_s3*y_bis_intersect, outside_distance_s3*z_bis_intersect); drawarrow p; label.rt(btex $s_3(t)$ etex, (outside_distance_s3*y_bis_intersect, outside_distance_s3*z_bis_intersect)); endfig; end