Newer
Older
Presentations / tau23mu_lhcb / 09_10_2014 / mchrzasz.ps
@Marcin Chrzaszcz Marcin Chrzaszcz on 3 Mar 2015 68 KB massive update
  1. %!PS-Adobe-2.0
  2. %%Creator: dvips(k) 5.98 Copyright 2009 Radical Eye Software
  3. %%Title: mchrzasz.dvi
  4. %%CreationDate: Thu Aug 7 23:35:59 2014
  5. %%Pages: 1
  6. %%PageOrder: Ascend
  7. %%BoundingBox: 0 0 363 273
  8. %%EndComments
  9. %DVIPSWebPage: (www.radicaleye.com)
  10. %DVIPSCommandLine: dvips -o mchrzasz.ps mchrzasz.dvi
  11. %DVIPSParameters: dpi=600
  12. %DVIPSSource: TeX output 2014.08.07:2335
  13. %%BeginProcSet: tex.pro 0 0
  14. %!
  15. /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
  16. N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
  17. mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
  18. 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
  19. landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
  20. mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
  21. matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
  22. exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
  23. statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
  24. N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
  25. /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
  26. /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
  27. array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
  28. df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
  29. definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
  30. }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
  31. B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
  32. 1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S
  33. /BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy
  34. setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask
  35. restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
  36. /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
  37. }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
  38. bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
  39. mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
  40. SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
  41. userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
  42. 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
  43. index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
  44. /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
  45. /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
  46. (LaserWriter 16/600)]{A length product length le{A length product exch 0
  47. exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
  48. end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
  49. grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
  50. imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
  51. exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
  52. fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
  53. delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
  54. B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
  55. p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
  56. rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
  57.  
  58. %%EndProcSet
  59. %%BeginProcSet: pstricks.pro 0 0
  60. % $Id: pstricks.pro 90 2009-01-30 10:58:51Z herbert $
  61. %
  62. %% PostScript prologue for pstricks.tex.
  63. %% Version 1.06, 2009/01/30
  64. %%
  65. %% This program can be redistributed and/or modified under the terms
  66. %% of the LaTeX Project Public License Distributed from CTAN archives
  67. %% in directory macros/latex/base/lppl.txt.
  68. %
  69. %
  70. % Define the follwing gs-functions if not known, eg when using distiller
  71. %
  72. systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if
  73. systemdict /.setblendmode known not {/.setblendmode { pop } def } if
  74. systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if
  75. %
  76. /tx@Dict 200 dict def % the main PSTricks dictionary
  77. tx@Dict begin
  78. /ADict 25 dict def % The arrow dictionaray
  79. /CM { matrix currentmatrix } bind def
  80. /SLW /setlinewidth load def
  81. /CLW /currentlinewidth load def
  82. /CP /currentpoint load def
  83. /ED { exch def } bind def
  84. /L /lineto load def
  85. /T /translate load def
  86. /TMatrix { } def
  87. /RAngle { 0 } def
  88. /Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments
  89. /Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known
  90. /ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter)
  91. /Div { dup 0 eq { pop } { div } ifelse } def % control the division
  92. /tan { dup cos abs 1.e-10 lt
  93. { pop 1.e10 } % return 1.e10 as infinit
  94. { dup sin exch cos div } ifelse % default sin/cos
  95. } def
  96. /Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees
  97. /Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root
  98. pop pop 0 }{ sqrt exch atan} ifelse } def
  99. /NET { neg exch neg exch T } def % change coordinate system to the negative one
  100. /Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter
  101. /Pyth2 { % Pythagoras, xA yA xB yB
  102. 3 -1 roll % xA xB yB yA
  103. sub % xA xB yB-yA
  104. 3 1 roll % yB-yA xA xB
  105. sub % yB-yA xA-xB
  106. Pyth } def
  107. /PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian
  108. /Rand { rand 4294967295 div } def % a real random number
  109. %----------------- hv added 20050516 ---------------
  110. /PiDiv2 1.57079632680 def
  111. /Pi 3.14159265359 def
  112. /TwoPi 6.28318530718 def
  113. /Euler 2.71828182846 def
  114. %/e Euler bind def
  115. %
  116. /RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees
  117. /DegtoRad { Pi mul 180 div } bind def % viceversa
  118. %----------------- hv end---------------------------
  119. /PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def
  120. %
  121. /PathLength {
  122. flattenpath /z 0 def
  123. { /y1 ED /x1 ED /y2 y1 def /x2 x1 def }
  124. { /y ED /x ED PathLength@ }
  125. {}
  126. { /y y2 def /x x2 def PathLength@ }
  127. /pathforall load stopped { pop pop pop pop } if
  128. z
  129. } def
  130. %
  131. /STP { .996264 dup scale } def % BP/PT scaling
  132. /STV { SDict begin normalscale end STP } def %
  133. %
  134. %%-------------- DG begin patch 15 ---------------%%
  135. %/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def
  136. %PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y
  137. %mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul
  138. %/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ]
  139. %0 } ifelse setdash stroke } def
  140. /DashLine {
  141. dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse
  142. /b ED /x1 ED /y1 ED /x ED /y ED
  143. /z y x add y1 add x1 add def
  144. /Coef b a .5 sub 2 mul y mul sub z Div round
  145. z mul a .5 sub 2 mul y mul add b exch Div def
  146. /y y Coef mul def
  147. /x x Coef mul def
  148. /y1 y1 Coef mul def
  149. /x1 x1 Coef mul def
  150. x1 0 gt y1 0 gt or x 0 gt or y 0 gt and
  151. { [ y x y1 x1 ] 1 a sub y mul }
  152. { [ 1 0 ] 0 } ifelse
  153. setdash stroke
  154. } def
  155. %%-------------- DG end patch 15 ---------------%%
  156. /DotLine {
  157. /b PathLength def
  158. /a ED /z ED /y CLW def
  159. /z y z add def
  160. a 0 gt {
  161. /b b a div def
  162. }{
  163. a 0 eq {
  164. /b b y sub def
  165. }{ a -3 eq {
  166. /b b y add def } if
  167. } ifelse
  168. } ifelse
  169. [ 0 b b z Div round Div dup 0 le { pop 1 } if ]
  170. a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse
  171. setdash 1 setlinecap stroke
  172. } def
  173. %
  174. /LineFill { % hv ------------ patch 7 -------------
  175. gsave
  176. abs /hatchWidthInc ED
  177. abs /hatchSepInc ED
  178. abs CLW add /a ED
  179. a 0 dtransform round exch round exch
  180. 2 copy idtransform
  181. exch Atan rotate
  182. idtransform pop /a ED
  183. .25 .25 itransform pathbbox
  184. /y2 ED
  185. a Div ceiling cvi /x2 ED /y1 ED
  186. a Div cvi /x1 ED /y2 y2 y1 sub def
  187. clip
  188. newpath
  189. 2 setlinecap
  190. systemdict
  191. /setstrokeadjust known { true setstrokeadjust } if
  192. x2 x1 sub 1 add {
  193. x1 a mul y1 moveto 0 y2 rlineto stroke
  194. /x1 x1 1 add
  195. hatchWidthInc 0 gt { CLW add } if
  196. def
  197. hatchSepInc 0 gt hatchWidthInc 0 gt or {
  198. /a a hatchSepInc add def
  199. CLW hatchWidthInc add SLW
  200. } if
  201. } repeat
  202. grestore
  203. pop pop } def
  204. %
  205. /PenroseFill {% on stack: scaling factor
  206. dup dup scale
  207. 1 exch div round /penroseFactor ED
  208. a 0 dtransform round exch round exch
  209. 2 copy idtransform
  210. exch Atan rotate
  211. idtransform pop /a ED
  212. .25 .25 itransform pathbbox
  213. /y2 ED
  214. a Div ceiling cvi /x2 ED /y1 ED
  215. a Div cvi /x1 ED /y2 y2 y1 sub def
  216. clip
  217. newpath
  218. systemdict
  219. /setstrokeadjust known { true setstrokeadjust } if
  220. /I/S/L/W/G/+/Z/F/E/D[/def/exch/for{E D}/add{s E get mul}
  221. { Z -36.2001 1 33 }{25 E S rlineto}{/q Z dup q G E q 1 + G}{Z 2 2}]{cvx def}forall
  222. [0 72 1008 {dup sin E cos }F ]1 setlinejoin/s W{/a W{/b I 10{/i I 4{/m I moveto
  223. i m +/j I 10{/l Z b m l + G a l G sub s m get div .2 + floor .3 + 25
  224. mul j l + S rmoveto}F i L j L stroke }F}F}F}F
  225. grestore
  226. pop pop
  227. } def
  228. %
  229. %gsave abs CLW add /a ED a 0 dtransform round exch round exch
  230. %2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25
  231. %% DG/SR modification begin - Dec. 12, 1997 - Patch 2
  232. %%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a
  233. %itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a
  234. %% DG/SR modification end
  235. %Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict
  236. %/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1
  237. %% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis)
  238. %% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore }
  239. %% def
  240. %a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore
  241. %pop pop } def
  242. %% DG/SR modification end
  243. %
  244. /BeginArrow {
  245. ADict begin % hold it local, for end see EndArrow
  246. /@mtrx CM def
  247. gsave
  248. 2 copy T
  249. 2 index sub neg exch
  250. 3 index sub exch Atan
  251. rotate newpath
  252. } def
  253. %
  254. /EndArrow { @mtrx setmatrix CP grestore end } def % end the ADict
  255. %
  256. /Arrow {
  257. CLW mul add dup
  258. 2 div /w ED
  259. mul dup /h ED
  260. mul /a ED
  261. { 0 h T 1 -1 scale } if
  262. w neg h moveto
  263. 0 0 L w h L w neg a neg rlineto
  264. gsave fill grestore
  265. } def
  266. %
  267. /ArrowD { % the sides are drawn as curves (hv 20071211)
  268. CLW mul add dup
  269. 2 div /w ED
  270. mul dup /h ED
  271. mul /Inset ED
  272. { 0 h T 1 -1 scale } if % changes the direction
  273. % we use y=w/h^2 * x^2 as equation for the control points
  274. % for the coordinates the arrow is seen from top to bottom
  275. % the bottom (tip) is (0;0)
  276. w neg h moveto % lower left of >
  277. w 9 div 4 mul neg h 3 div 2 mul
  278. w 9 div neg h 3 div
  279. 0 0 curveto % tip of >
  280. w 9 div h 3 div
  281. w 9 div 4 mul h 3 div 2 mul
  282. w h curveto % upper left of >
  283. w neg Inset neg rlineto % move to x=0 and inset
  284. gsave fill grestore
  285. } def
  286. %
  287. /Tbar {
  288. CLW mul add /z ED
  289. z -2 div CLW 2 div moveto
  290. z 0 rlineto stroke
  291. 0 CLW moveto
  292. } def
  293. %
  294. /Bracket {
  295. CLW mul add dup CLW sub 2 div
  296. /x ED mul CLW add /y ED /z CLW 2 div def
  297. x neg y moveto
  298. x neg CLW 2 div L x CLW 2 div L x y L stroke
  299. 0 CLW moveto
  300. } def
  301. %
  302. /RoundBracket {
  303. CLW mul add dup 2 div
  304. /x ED mul /y ED /mtrx CM def
  305. 0 CLW 2 div T x y mul 0 ne { x y scale } if
  306. 1 1 moveto
  307. .85 .5 .35 0 0 0 curveto
  308. -.35 0 -.85 .5 -1 1 curveto
  309. mtrx setmatrix stroke 0 CLW moveto
  310. } def
  311. %
  312. /SD { 0 360 arc fill } def
  313. %
  314. /EndDot { % DS is the dot size
  315. { /z DS def } { /z 0 def } ifelse
  316. /b ED 0 z DS SD b { 0 z DS CLW sub SD } if
  317. 0 DS z add CLW 4 div sub moveto } def
  318. %
  319. /Shadow { [ { /moveto load } { /lineto load } { /curveto load } {
  320. /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto
  321. load } if ] cvx newpath 3 1 roll T exec } def
  322. %
  323. %/NArray {
  324. % aload length 2 div dup dup cvi eq not { exch pop } if /n exch
  325. % cvi def
  326. %} def
  327. %
  328. /NArray { % holds the coordinates and on top of stack the showpoints boolean
  329. /showpoints ED
  330. counttomark 2 div dup cvi /n ED
  331. n eq not { exch pop } if
  332. showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse
  333. } def
  334. %
  335. /Line {
  336. NArray n 0 eq not
  337. { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def
  338. n { Lineto } repeat
  339. CP 4 2 roll ArrowB L pop pop
  340. } if
  341. } def
  342. %
  343. /Arcto {
  344. /a [ 6 -2 roll ] cvx def
  345. a r
  346. /arcto load stopped { 5 } { 4 } ifelse { pop } repeat
  347. a
  348. } def
  349. %
  350. /CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq
  351. and { pop pop /n n 1 sub def } if } def
  352. /Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop }
  353. repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1
  354. ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1
  355. moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto
  356. Lineto pop pop closepath } ifelse } def
  357. /Diamond {
  358. /mtrx CM def
  359. T rotate
  360. /h ED
  361. /w ED
  362. dup 0 eq { pop } { CLW mul neg
  363. /d ED
  364. /a w h Atan def
  365. /h d a sin Div h add def
  366. /w d a cos Div w add def } ifelse
  367. mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div
  368. /ArrowA { moveto } def
  369. /ArrowB { } def
  370. false Line
  371. closepath mtrx setmatrix } def
  372. % DG modification begin - Jan. 15, 1997
  373. %/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq {
  374. %pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2
  375. %div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0
  376. %d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx
  377. %setmatrix } def
  378. %
  379. /Triangle {
  380. /mtrx CM def
  381. translate
  382. rotate /h ED 2 div /w ED
  383. dup CLW mul /d ED
  384. /h h d w h Atan sin Div sub def
  385. /w w d h w Atan 2 div dup cos exch sin Div mul sub def
  386. mark
  387. 0 d w neg d 0 h w d 0 d
  388. /ArrowA { moveto } def
  389. /ArrowB { } def
  390. false
  391. Line
  392. closepath
  393. mtrx
  394. % DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis)
  395. % setmatrix } def
  396. setmatrix pop
  397. } def
  398. % DG/SR modification end
  399. %
  400. /CCA {
  401. /y ED /x ED
  402. 2 copy y sub /dy1 ED
  403. x sub /dx1 ED
  404. /l1 dx1 dy1 Pyth def
  405. } def
  406. %
  407. /CC {
  408. /l0 l1 def
  409. /x1 x dx sub def
  410. /y1 y dy sub def
  411. /dx0 dx1 def
  412. /dy0 dy1 def
  413. CCA
  414. /dx dx0 l1 c exp mul dx1 l0 c exp mul add def
  415. /dy dy0 l1 c exp mul dy1 l0 c exp mul add def
  416. /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos abs b exp a mul dx dy Pyth Div 2 div def
  417. /x2 x l0 dx mul m mul sub def
  418. /y2 y l0 dy mul m mul sub def
  419. /dx l1 dx mul m mul neg def
  420. /dy l1 dy mul m mul neg def
  421. } def
  422. %
  423. /IC {
  424. /c c 1 add def
  425. c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } ifelse
  426. /a a 2 mul 3 div 45 cos b exp div def
  427. CCA
  428. /dx 0 def
  429. /dy 0 def
  430. } def
  431. %
  432. /BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def
  433. /NC { CC x1 y1 x2 y2 x y curveto } def
  434. /EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def
  435. /BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def
  436. /NAC { x2 y2 x y curveto CC x1 y1 } def
  437. /EAC { x2 y2 x y ArrowB curveto pop pop } def
  438. %
  439. /OpenCurve {
  440. NArray n 3 lt
  441. { n { pop pop } repeat }
  442. { BOC /n n 3 sub def n { NC } repeat EOC } ifelse
  443. } def
  444. %
  445. /AltCurve {
  446. { false NArray n 2 mul 2 roll
  447. [ n 2 mul 3 sub 1 roll ] aload
  448. /Points ED
  449. n 2 mul -2 roll }
  450. { false NArray } ifelse
  451. n 4 lt { n { pop pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse
  452. } def
  453. %
  454. /ClosedCurve {
  455. NArray n 3 lt
  456. { n { pop pop } repeat }
  457. { n 3 gt { CheckClosed } if
  458. 6 copy n 2 mul 6 add 6 roll
  459. IC CC x y moveto n { NC } repeat
  460. closepath pop pop
  461. } ifelse
  462. } def
  463. %
  464. /SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def
  465. /ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def
  466. /SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } def
  467. %
  468. /FontDot {
  469. DS 2 mul dup
  470. matrix scale matrix concatmatrix exch matrix
  471. rotate matrix concatmatrix exch
  472. findfont exch makefont setfont
  473. } def
  474. %
  475. /Rect {
  476. x1 y1 y2 add 2 div moveto
  477. x1 y2 lineto
  478. x2 y2 lineto
  479. x2 y1 lineto
  480. x1 y1 lineto
  481. closepath
  482. } def
  483. %
  484. /OvalFrame {
  485. x1 x2 eq y1 y2 eq or
  486. { pop pop x1 y1 moveto x2 y2 L }
  487. { y1 y2 sub abs x1 x2 sub abs 2 copy gt
  488. { exch pop } { pop } ifelse
  489. 2 div exch { dup 3 1 roll mul exch } if
  490. 2 copy lt { pop } { exch pop } ifelse
  491. /b ED
  492. x1 y1 y2 add 2 div moveto
  493. x1 y2 x2 y2 b arcto
  494. x2 y2 x2 y1 b arcto
  495. x2 y1 x1 y1 b arcto
  496. x1 y1 x1 y2 b arcto
  497. 16 { pop } repeat
  498. closepath
  499. } ifelse
  500. } def
  501. %
  502. /Frame {
  503. CLW mul /a ED
  504. 3 -1 roll
  505. 2 copy gt { exch } if
  506. a sub /y2 ED
  507. a add /y1 ED
  508. 2 copy gt { exch } if
  509. a sub /x2 ED
  510. a add /x1 ED
  511. 1 index 0 eq { pop pop Rect } { OvalFrame } ifelse
  512. } def
  513. %
  514. /BezierNArray {
  515. /f ED
  516. counttomark 2 div dup cvi /n ED
  517. n eq not { exch pop } if
  518. n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat
  519. f { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse
  520. } def
  521. %
  522. /OpenBezier {
  523. BezierNArray
  524. n 1 eq
  525. { pop pop }
  526. { ArrowA n 4 sub 3 idiv
  527. { 6 2 roll 4 2 roll curveto } repeat
  528. 6 2 roll 4 2 roll ArrowB curveto } ifelse
  529. } def
  530. %
  531. /ClosedBezier {
  532. BezierNArray
  533. n 1 eq
  534. { pop pop }
  535. { moveto n 1 sub 3 idiv
  536. { 6 2 roll 4 2 roll curveto } repeat
  537. closepath } ifelse
  538. } def
  539. %
  540. /BezierShowPoints {
  541. gsave
  542. Points aload length 2 div cvi /n ED
  543. moveto
  544. n 1 sub { lineto } repeat
  545. CLW 2 div SLW [ 4 4 ] 0 setdash stroke
  546. grestore
  547. } def
  548. %
  549. /Parab {
  550. /y0 ED /x0 ED /y1 ED /x1 ED
  551. /dx x0 x1 sub 3 div def
  552. /dy y0 y1 sub 3 div def
  553. x0 dx sub y0 dy add x1 y1 ArrowA
  554. x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB
  555. curveto
  556. /Points [ x1 y1 x0 y0 x0 2 mul x1 sub y1 ] def
  557. } def
  558. %
  559. /Grid {
  560. newpath
  561. /a 4 string def
  562. /b ED /c ED /n ED
  563. cvi dup 1 lt { pop 1 } if
  564. /s ED
  565. s div dup 0 eq { pop 1 } if
  566. /dy ED s div dup 0 eq { pop 1 } if
  567. /dx ED dy div round dy mul
  568. /y0 ED dx div round dx mul
  569. /x0 ED dy div round cvi
  570. /y2 ED dx div round cvi
  571. /x2 ED dy div round cvi
  572. /y1 ED dx div round cvi
  573. /x1 ED
  574. /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def
  575. /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def
  576. b 0 gt {
  577. /z1 b 4 div CLW 2 div add def
  578. % /Helvetica findfont b scalefont setfont
  579. /b b .95 mul CLW 2 div add def } if
  580. systemdict /setstrokeadjust known
  581. { true setstrokeadjust /t { } def }
  582. { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add
  583. exch itransform } bind def } ifelse
  584. gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse
  585. /i x1 def
  586. /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def
  587. /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def
  588. x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if
  589. { i dx mul dup y0 moveto
  590. b 0 gt
  591. { gsave c i a cvs dup stringwidth pop
  592. /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse
  593. h 0 gt {b neg}{z1} ifelse
  594. rmoveto show grestore } if
  595. dup t f moveto
  596. g t L stroke
  597. /i i w add def
  598. } repeat
  599. grestore
  600. gsave
  601. n 0 gt
  602. % DG/SR modification begin - Nov. 7, 1997 - Patch 1
  603. %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash }
  604. { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash }
  605. % DG/SR modification end
  606. { 2 setlinecap } ifelse
  607. /i y1 def
  608. /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def
  609. /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def
  610. y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if
  611. { newpath i dy mul dup x0 exch moveto
  612. b 0 gt { gsave c i a cvs dup stringwidth pop
  613. /z2 ED
  614. w 0 gt {z1 z2 add neg} {z1} ifelse
  615. h 0 gt {z1} {b neg} ifelse
  616. rmoveto show grestore } if
  617. dup f exch t moveto
  618. g exch t L stroke
  619. /i i h add def
  620. } repeat
  621. grestore
  622. } def
  623. %
  624. /ArcArrow {
  625. /d ED /b ED /a ED
  626. gsave
  627. newpath 0 -1000 moveto clip
  628. newpath
  629. 0 1 0 0 b
  630. grestore
  631. c mul
  632. /e ED
  633. pop pop pop r a e d PtoC y add exch x add
  634. exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c
  635. mul neg d
  636. } def
  637. %
  638. /Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def
  639. %
  640. /ArcAdjust { %%%% Vincent Guirardel
  641. % given a target length (targetLength) and an initial angle (angle0) [in the stack],
  642. % let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0).
  643. % This computes an angle t such that (x0,y0) is at distance
  644. % targetLength from the point M(t)=(rx*cos(t),ry*sin(t)).
  645. % NOTE: this an absolute angle, it does not have to be added or substracted to angle0
  646. % contrary to TvZ's code.
  647. % To achieve, this, one iterates the following process: start with some angle t,
  648. % compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)].
  649. % Now take t' (= new angle) so that (0,0) M(t') and M' are aligned.
  650. %
  651. % Another difference with TvZ's code is that we need d (=add/sub) to be defined.
  652. % the value of d = add/sub is used to know on which side we have to move.
  653. % It is only used in the initialisation of the angle before the iteration.
  654. %
  655. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  656. % Input stack: 1: target length 2: initial angle
  657. % variables used : rx, ry, d (=add/sub)
  658. %
  659. /targetLength ED /angle0 ED
  660. /x0 rx angle0 cos mul def
  661. /y0 ry angle0 sin mul def
  662. % we are looking for an angle t such that (x0,y0) is at distance targetLength
  663. % from the point M(t)=(rx*cos(t),ry*sin(t)))
  664. %initialisation of angle (using 1st order approx = TvZ's code)
  665. targetLength 57.2958 mul
  666. angle0 sin rx mul dup mul
  667. angle0 cos ry mul dup mul
  668. add sqrt div
  669. % if initialisation angle is two large (more than 90 degrees) set it to 90 degrees
  670. % (if the ellipse is very curved at the point where we draw the arrow, %
  671. % the value can be much more than 360 degrees !)
  672. % this should avoid going on the wrong side (more than 180 degrees) or go near
  673. % a bad attractive point (at 180 degrees)
  674. dup 90 ge { pop 90 } if
  675. angle0 exch d % add or sub
  676. % maximum number of times to iterate the iterative procedure:
  677. % iterative procedure: takes an angle t on top of stack, computes a
  678. % better angle (and put it on top of stack)
  679. 30 { dup
  680. % compute distance D between (x0,y0) and M(t)
  681. dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt
  682. % if D almost equals targetLength, we stop
  683. dup targetLength sub abs 1e-5 le { pop exit } if
  684. % stack now contains D t
  685. % compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]:
  686. % M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 )
  687. exch dup cos rx mul x0 sub exch sin ry mul y0 sub
  688. % stack contains: y(t)-y0, x(t)-x0, d
  689. 2 index Div targetLength mul y0 add ry Div exch
  690. 2 index Div targetLength mul x0 add rx Div
  691. % stack contains x(t')/rx , y(t')/ry , d
  692. % now compute t', and remove D from stack
  693. atan exch pop
  694. } repeat
  695. % we don't look at what happened... in particular, if targetLength is greater
  696. % than the diameter of the ellipse...
  697. % the final angle will be around /angle0 + 180. maybe we should treat this pathological case...
  698. % after iteration, stack contains an angle t such that M(t) is the tail of the arrow
  699. % to give back the result as a an angle relative to angle0 we could add the following line:
  700. % angle0 sub 0 exch d
  701. %
  702. % begin bug fix 2006-01-11
  703. % we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180
  704. %(we don't want to make the ellipse turn more or less than it should)...
  705. dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse
  706. % end bug fix
  707. } def
  708. %
  709. /EllipticArcArrow {
  710. /d ED % is add or sub
  711. /b ED % arrow procedure
  712. /a1 ED % angle
  713. gsave
  714. newpath
  715. 0 -1000 moveto
  716. clip % Set clippath far from arrow.
  717. newpath
  718. 0 1 0 0 b % Draw arrow to determine length.
  719. grestore
  720. % Length of arrow is on top of stack. Next 3 numbers are junk.
  721. %
  722. a1 exch ArcAdjust % Angular position of base of arrow.
  723. /a2 ED
  724. pop pop pop
  725. a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig
  726. a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig
  727. a1 cos rx mul xOrig add %
  728. a1 sin ry mul yOrig add %
  729. % Now arrow tip coor and base coor are on stack.
  730. b pop pop pop pop % Draw arrow, and discard coordinates.
  731. a2 CLW 8 div
  732. % change value of d (test it by looking if `` 1 1 d '' gives 2 or not )
  733. 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse
  734. ArcAdjust
  735. % resets original value of d
  736. 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap.
  737. } def
  738. %%------------------ tvz/DG/hv (2004-05-10) end -------------------%%
  739. %
  740. /Rot { CP CP translate 3 -1 roll neg rotate NET } def
  741. %
  742. /RotBegin {
  743. tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if
  744. /TMatrix [ TMatrix CM ] cvx def
  745. /a ED
  746. a Rot /RAngle [ RAngle dup a add ] cvx def
  747. } def
  748. %
  749. /RotEnd {
  750. /TMatrix [ TMatrix setmatrix ] cvx def
  751. /RAngle [ RAngle pop ] cvx def
  752. } def
  753. %
  754. /PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def
  755. /PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def
  756. /PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def
  757. %
  758. /Uput {
  759. /a ED
  760. add 2 div /h ED 2
  761. div /w ED
  762. /s a sin def
  763. /c a cos def
  764. /b s abs c abs 2 copy gt dup
  765. /q ED
  766. { pop } { exch pop } ifelse def
  767. /w1 c b div w mul def
  768. /h1 s b div h mul def
  769. q { w1 abs w sub dup c mul abs }{ h1 abs h sub dup s mul abs } ifelse
  770. } def
  771. %
  772. /UUput {
  773. /z ED
  774. abs /y ED
  775. /x ED
  776. q { x s div c mul abs y gt }{ x c div s mul abs y gt } ifelse
  777. { x x mul y y mul sub z z mul add sqrt z add }
  778. { q { x s div } { x c div } ifelse abs
  779. } ifelse
  780. a PtoC
  781. h1 add exch
  782. w1 add exch
  783. } def
  784. %
  785. /BeginOL {
  786. dup (all) eq exch TheOL eq or
  787. { IfVisible not { Visible /IfVisible true def } if }
  788. { IfVisible { Invisible /IfVisible false def } if } ifelse
  789. } def
  790. %
  791. /InitOL {
  792. /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def
  793. /Visible { CP OLUnit idtransform T moveto } def
  794. /Invisible { CP OLUnit neg exch neg exch idtransform T moveto } def
  795. /BOL { BeginOL } def
  796. /IfVisible true def
  797. } def
  798. %
  799. end
  800. %-----------------------------------------------------------------------------%
  801. %
  802. % END pstricks.pro
  803.  
  804. %%EndProcSet
  805. %%BeginProcSet: pst-algparser.pro 0 0
  806. % $Id: pst-algparser.pro 26 2008-06-14 11:50:02Z herbert $
  807. %%
  808. %% PostScript prologue for PSTricks algorithm parser
  809. %% Version 0.01, 2008/01/01
  810. %%
  811. %% This program can be redistributed and/or modified under the terms
  812. %% of the LaTeX Project Public License Distributed from CTAN archives
  813. %% in directory macros/latex/base/lppl.txt.
  814. %%
  815. %%-----------------------------------------------------------------------------%
  816. %
  817. /AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez
  818. %
  819. /tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin
  820. %
  821. % PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12
  822. % E->T|E+T
  823. % T->FS|T*FS
  824. % FS -> F | +FS | -FS
  825. % F->P|F^SF
  826. % P->(E)|literal
  827. % literal->number|var|var[E]|func(params)
  828. % params->E|E,param
  829. % number->TOBEFINISHED
  830. %
  831. %% E expression, T term, SF signed factor, F factor, P power
  832. %
  833. %% parser
  834. %
  835. %% str
  836. %
  837. %% C->E<condition_operators>E
  838. %% STR index -> STR index+lenExpr
  839. /AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def
  840. %
  841. %% analyze Expression List (separator , or | )
  842. %% STR index -> STR index+lenExpr
  843. %% /AnalyzeListOfE {
  844. %% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar
  845. %% NextNonBlankChar dup 0 eq { pop exit } if
  846. %% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if
  847. %% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop
  848. %% AnalyzeListOfEPostHook
  849. %% } def
  850. /AnalyzeListOfE {
  851. /NotFirst false def
  852. { NextNonBlankChar pop AnalyzeExpr
  853. NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse
  854. dup Strlen eq { exit } if NextNonBlankChar
  855. dup 44 ne 1 index 124 ne and
  856. { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse }
  857. if pop 1 add } loop
  858. AnalyzeListOfEPostHook
  859. } def
  860. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  861. %% E->T|E+T
  862. %% STR index -> STR index+lenExpr
  863. /AnalyzeExpr {
  864. AnalyzePreHook AnalyzeTerm IsEndingExpr
  865. { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse }
  866. { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop }
  867. ifelse
  868. AnalyzePostHook
  869. } def
  870. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  871. %% T->FS|T*FS
  872. %% STR index
  873. /AnalyzeTerm {
  874. AnalyzePreHook AnalyzeSignedFactor IsEndingTerm
  875. { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse }
  876. { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop }
  877. ifelse
  878. AnalyzePostHook
  879. } def
  880. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  881. %% FS -> F | +FS | -FS
  882. %% STR index
  883. /AnalyzeSignedFactor {
  884. AnalyzePreHook 2 copy get dup IsUnaryOp
  885. { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp }
  886. { pop AnalyzeFactor }
  887. ifelse AnalyzePostHook
  888. } def
  889. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  890. %% F->P|F^P
  891. %% STR index
  892. /AnalyzeFactor {
  893. AnalyzePreHook AnalyzePower IsEndingFactor
  894. { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse }
  895. { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop }
  896. ifelse AnalyzePostHook
  897. } def
  898. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  899. %% P->(E)|literal
  900. %% STR index
  901. /AnalyzePower {
  902. %% depending of first char either a number, or a literal
  903. 2 copy get dup 40 eq%%an open par
  904. { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop }
  905. { AnalyzeLiteral }
  906. ifelse
  907. } def
  908. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  909. %% STR index STR[index] -> STR index
  910. %/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def
  911. /AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006
  912. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  913. %% recognize + or -
  914. %% chr -> T/F
  915. /IsUnaryOp { dup 43 eq exch 45 eq or } bind def
  916. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  917. %% a number can contain only : 0123456789.
  918. %% chr -> T/F
  919. /IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def
  920. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  921. %% STR index -> STR index number
  922. %% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)?
  923. %% STR index -> STR index' number
  924. /ReadNumber {
  925. exch dup 3 -1 roll dup 3 1 roll
  926. %%read mantissa
  927. { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop
  928. dup 101 eq exch 69 eq or
  929. %%% there is a "e" or "E" -> read exponant
  930. { 1 add 2 copy get dup IsUnaryOp
  931. { pop 1 add 2 copy get } if
  932. { IsNumber not { exit } if 1 add 2 copy get } loop }
  933. if
  934. dup 4 1 roll
  935. 3 -1 roll exch 1 index sub getinterval
  936. } def
  937. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  938. %% a number can contain only : 0123456789.
  939. %% chr -> T/F
  940. /IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def
  941. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  942. %% STR index -> STR index number
  943. %% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)?
  944. %% STR index -> STR index' number
  945. /ReadCondOp {
  946. NextNonBlankChar 1 index 4 1 roll
  947. { IsCondOp not { exit } if 1 add 2 copy get } loop
  948. 2 copy 5 -1 roll
  949. exch 1 index sub getinterval 3 1 roll
  950. } def
  951. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  952. %% a literal can contain only : 0123456789.
  953. %% chr -> T/F
  954. /IsLiteral {%
  955. dup 48 ge exch dup 57 le 3 -1 roll and exch
  956. dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch
  957. dup 97 ge exch 122 le and or } bind def
  958. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  959. %% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)?
  960. %% STR index -> literal STR index' nextchr
  961. /ReadLiteral {
  962. exch dup 3 -1 roll dup 3 1 roll
  963. %%read literal core
  964. { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop
  965. 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll
  966. } def
  967. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  968. %% expr is ended by end of str or a clpar
  969. %% STR index -> STR index STR[index] T/F
  970. /IsEndingExpr {%
  971. 2 copy dup Strlen eq
  972. %% if end of str is reached -> end !
  973. { pop pop 0 true }
  974. %% ending chr -> clpar, comma, |, <, >, =, !,
  975. {get dup dup 41 eq
  976. exch dup 124 eq
  977. exch dup 93 eq
  978. exch dup 44 eq
  979. exch dup 30 eq
  980. exch dup 60 ge exch 62 le and or or or or or}
  981. ifelse } def
  982. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  983. %% expr is ended by end of str or a +-
  984. %% STR index -> STR index STR[index] T/F
  985. /IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def
  986. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  987. %% expr is ended by end of str or */
  988. %% STR index -> STR index STR[index] T/F
  989. /IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def
  990. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  991. %% expr is ended by end of str or ^
  992. %% STR index -> STR index STR[index] T/F
  993. /IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def
  994. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  995. %% STR index -> STR index STR[index]
  996. /NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def
  997. /neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def
  998. %%%%%%%%%%%%%%%%%%%%%%%%
  999. %% DEBUG
  1000. /BRK {false} def
  1001. /BRKtrue {/BRK true def} def
  1002. /BRKStop {BRK {BRKtoto} if } def
  1003. /BRKEvalStop {BRK exch if } def
  1004. /BRKBRK2true {BRK {BRK2true} if } def
  1005. /BRK2 {false} def
  1006. /BRK2true {/BRK2 true def} def
  1007. /BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def
  1008. end
  1009. %
  1010. %-------------------------------------------------------------------------------%
  1011. %
  1012. /tx@AlgToPs 12 dict def tx@AlgToPs begin
  1013. %
  1014. %% algExpr -> PSVector
  1015. /AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def
  1016. /EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def
  1017. /InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def
  1018. /Strlen 0 def
  1019. /EvalListOfExpr {} def%
  1020. /EvalNumber {%
  1021. ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx
  1022. exch 1 add array astore def NextNonBlankChar pop } def
  1023. /EvalAddSub {%
  1024. /ExpressionVector ExpressionVector aload length dup 5 add -1 roll
  1025. 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def
  1026. } def
  1027. /EvalMulDiv {%
  1028. /ExpressionVector ExpressionVector aload length dup 5 add -1 roll
  1029. 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def
  1030. } def
  1031. /EvalPower {%
  1032. /ExpressionVector ExpressionVector aload length dup 5 add -1 roll
  1033. pop /exp cvx exch 1 add array astore def
  1034. } def
  1035. /EvalLiteral {%
  1036. ReadLiteral
  1037. dup 40 eq%%% there is an open par -> function call
  1038. { pop 2 index
  1039. dup (Sum) eq { EvalSum }
  1040. { dup (IfTE) eq { EvalCond }
  1041. { dup (Derive) eq { pop EvalDerive }
  1042. { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc
  1043. /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx
  1044. exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse }
  1045. { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def
  1046. dup 91 eq%%% there is an open bracket -> vector element
  1047. { pop 1 add NextNonBlankChar pop AnalyzeExpr
  1048. /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add }
  1049. { pop NextNonBlankChar pop }
  1050. ifelse}
  1051. ifelse
  1052. } def
  1053. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1054. %% the derive function : Derive(n,f(x))
  1055. %% firstparindex lastparindex ->
  1056. /EvalDerive {
  1057. %% manage the function descripiton
  1058. 1 add ReadNumber 3 1 roll NextNonBlankChar
  1059. 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
  1060. 1 add NextNonBlankChar pop
  1061. 3 -1 roll cvi
  1062. dup 0 eq
  1063. { pop AnalyzeExpr 3 -1 roll pop 1 add }
  1064. { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll
  1065. { (x) tx@Derive begin Derive end } repeat
  1066. ExpressionVector exch /ExpressionVector [] def
  1067. AlgToPs aload length
  1068. /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def
  1069. l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add
  1070. 1 index length /Strlen exch def } ifelse
  1071. } def
  1072. /EvalSum {%
  1073. pop 1 add NextNonBlankChar pop
  1074. %% read the variable name
  1075. ReadLiteral pop NextNonBlankChar
  1076. 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if
  1077. %% read the initial value
  1078. 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll
  1079. 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
  1080. %% read the increment value
  1081. 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll
  1082. 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
  1083. %% read the limit value
  1084. 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll
  1085. 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
  1086. /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll
  1087. 5 -1 roll 4 add array astore def
  1088. %% keep ExpressionVector for later and create a new one for internal Sum computation
  1089. ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def
  1090. 1 add NextNonBlankChar pop AnalyzeExpr
  1091. %% add each term
  1092. /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def
  1093. /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add
  1094. array astore def 3 -1 roll pop 1 add
  1095. } def
  1096. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1097. %% Convert to radians if trigo function call
  1098. %% (name) ->
  1099. /TrigoFunc {
  1100. dup (cos) eq 1 index (sin) eq or exch (tan) eq or
  1101. { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add
  1102. array astore def
  1103. } if
  1104. } def
  1105. /EvalCond {%
  1106. pop 1 add AnalyzeCond NextNonBlankChar
  1107. 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if
  1108. ExpressionVector 3 1 roll /ExpressionVector [] def
  1109. 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def
  1110. NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if
  1111. 1 add AnalyzeExpr
  1112. NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if
  1113. ExpressionVector
  1114. /ExpressionVector 6 -1 roll aload length dup
  1115. 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def
  1116. 1 add 3 -1 roll pop
  1117. } def
  1118. %% CondOp STR index
  1119. /EvalCondOp {%
  1120. 3 -1 roll
  1121. dup (=) eq { /eq } {%
  1122. dup (<) eq { /lt } {%
  1123. dup (>) eq { /gt } {%
  1124. dup (>=) eq { /ge } {%
  1125. dup (<=) eq { /ge } {%
  1126. dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator }
  1127. ifelse } ifelse } ifelse } ifelse } ifelse } ifelse
  1128. cvx exch pop
  1129. /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def
  1130. /EvalUnaryOp {
  1131. 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if
  1132. } def
  1133. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1134. %% H O O K S
  1135. /AnalyzePreHook {} bind def
  1136. /PreEvalHook {} bind def
  1137. /AnalyzeListOfEPostHook {} bind def
  1138. /AnalyzePostHook {} def
  1139. /RollOp { 3 1 roll } bind def
  1140. end %tx@CoreAnalyzerDict
  1141. %
  1142. %--------------------------------------------------------------------%
  1143. %
  1144. /tx@Derive 41 dict def tx@Derive begin
  1145. %%increase ^^ for each function added
  1146. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1147. %% algExpr variable -> PSVector
  1148. /Derive {%
  1149. 10240 string 3 1 roll 0 3 1 roll
  1150. /Variable exch def
  1151. tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end
  1152. } def
  1153. /Strlen 0 def
  1154. /InitParser { dup length /Strlen exch def 0 } def
  1155. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1156. %% algExpr variable index -> PSVector
  1157. /DeriveIndexed {%
  1158. 3 1 roll 10240 string 3 1 roll 0 3 1 roll
  1159. /Variable exch def
  1160. tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end
  1161. } def
  1162. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1163. %% (u,v)'=-(u',v')
  1164. /EvalListOfExpr {%
  1165. 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe
  1166. 2 copy 7 -1 roll dup length 4 1 roll putinterval add
  1167. 6 -2 roll pop pop
  1168. 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def
  1169. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1170. %% (-u)'=-(u')
  1171. /EvalUnaryOp {
  1172. 4 -2 roll 4 index (0) eq
  1173. { (0) StrConcat 7 -1 roll pop }
  1174. { 7 -1 roll 45 eq
  1175. { AddSub AddOpPar true } { false } ifelse
  1176. 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse
  1177. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1178. 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1179. } def
  1180. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1181. %% (number)'=0
  1182. /EvalNumber { ReadNumber (0) 6 2 roll } def
  1183. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1184. %% (u+v)'=u'+v'
  1185. /EvalAddSub {%
  1186. 7 index dup (0) eq
  1187. { pop true }%% du=0 nothing added
  1188. { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false }
  1189. ifelse
  1190. 5 index dup (0) eq
  1191. { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0
  1192. { exch
  1193. { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added
  1194. { 5 -2 roll 7 index 43 eq%%something yet added
  1195. { AddAdd false } { AddSub AddOpPar true } ifelse }
  1196. ifelse 11 1 roll
  1197. 3 -1 roll StrConcat 10 -1 roll { AddClPar } if
  1198. 2 copy pop 0 6 2 roll GetIntervalNewStr }
  1199. ifelse
  1200. mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1201. } def
  1202. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1203. %% (u*v)' or (u/v)'
  1204. /EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def
  1205. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1206. %% (u*v)'=u'*v+u*v'
  1207. /EvalMul {%
  1208. 4 -2 roll 7 index dup (0) eq
  1209. { pop false }%%du=0
  1210. { (1) eq%%du=1
  1211. { false }
  1212. { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse
  1213. 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if
  1214. true }%%du!=0
  1215. ifelse
  1216. 5 1 roll 5 index (0) eq
  1217. { 5 -1 roll not { (0) StrConcat } if }%%dv=0
  1218. { 5 -1 roll { AddAdd } if
  1219. 4 index (1) eq
  1220. { 8 index StrConcat }
  1221. { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar }
  1222. ifelse
  1223. }%%dv!=0
  1224. ifelse
  1225. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1226. mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1227. } def
  1228. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1229. %% (u/v)'=(u'*v-u*v')/v^2
  1230. /EvalDiv {%
  1231. 4 -2 roll
  1232. 4 index (0) eq%%dv=0 -> u'/v
  1233. { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse }
  1234. { 7 index dup (0) eq
  1235. { pop }%%du=0
  1236. { (1) eq%%du=1
  1237. { false }
  1238. { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse
  1239. 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0
  1240. ifelse
  1241. AddSub
  1242. 4 index (1) eq
  1243. { 8 index StrConcat }
  1244. { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar }
  1245. ifelse
  1246. %}%%dv!=0
  1247. 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar
  1248. AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add }
  1249. ifelse
  1250. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1251. mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1252. } def
  1253. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1254. %% str1 index str2 -> str1 index
  1255. /StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def
  1256. /GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def
  1257. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1258. %% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u)
  1259. /EvalPower {%
  1260. 4 -2 roll 7 index (0) eq
  1261. {%%if du=0 then (u^v)'=v'ln(u)u^v
  1262. 4 index (0) eq
  1263. { (0) StrConcat }%%if dv=0 then (u^v)'=0
  1264. { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if
  1265. 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if
  1266. AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse
  1267. }
  1268. {%%du!=0
  1269. 4 index (0) eq
  1270. {%%if dv=0 then (u^v)'=vu'u^(v-1)
  1271. 5 index dup IsStrNumber
  1272. { dup (0) eq
  1273. { StrConcat }
  1274. { dup dup (1) eq exch (1.0) eq or
  1275. { StrConcat }
  1276. { StrConcat
  1277. 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1
  1278. { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006
  1279. (*\() StrConcat 8 index StrConcat (\)) StrConcat
  1280. 5 index dup dup (2) eq exch (2.0) eq or
  1281. { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse }
  1282. { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat
  1283. 5 index StrConcat (-1\)) StrConcat } ifelse
  1284. }
  1285. {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u)
  1286. 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if
  1287. AddOpPar 5 index StrConcat (\)*\() StrConcat
  1288. 8 index StrConcat (\)^\() StrConcat
  1289. 5 index StrConcat (-1\)+\() StrConcat
  1290. 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if
  1291. 8 index StrConcat (\)^\() StrConcat
  1292. 5 index StrConcat (\)*ln\() StrConcat
  1293. 8 index StrConcat AddClPar
  1294. } ifelse
  1295. } ifelse
  1296. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1297. mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1298. } def
  1299. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1300. %% str -> true/false
  1301. /IsStrNumber {%
  1302. true exch
  1303. { dup 48 lt exch dup 57 gt 3 -1 roll or
  1304. exch dup 46 ne%%.
  1305. exch dup 43 ne%%+
  1306. exch 45 ne%%-
  1307. and and and { pop false } if } forall
  1308. } def
  1309. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1310. %% literal switch -> func call, vector, variables
  1311. /EvalLiteral {%
  1312. ReadLiteral dup 40 eq%%% there is an open par -> function call
  1313. { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec }
  1314. { dup 91 eq%%% there is an open bracket -> vector element
  1315. { ERROR_vector_not_yet_implemented }
  1316. { pop EvalVariable }
  1317. ifelse }
  1318. ifelse
  1319. } def
  1320. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1321. %% first last parpos Expr[first:parpos-1] ->
  1322. /EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def
  1323. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1324. %% (f(u))'=u'f'(u)
  1325. /EvalFunc {
  1326. 4 2 roll 4 index (1) ne
  1327. { AddOpPar 4 index StrConcat (\)*) StrConcat } if
  1328. (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec
  1329. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1330. mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1331. } def
  1332. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1333. %% Func derivative -> Eval<func>
  1334. /EvalFunc_sin {%
  1335. PreCommonFunc
  1336. { (cos\() StrConcat 5 index StrConcat AddClPar } if
  1337. PostCommonFunc } def
  1338. /EvalFunc_cos {%
  1339. PreCommonFunc
  1340. { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if
  1341. PostCommonFunc } def
  1342. /EvalFunc_tan {%
  1343. PreCommonFunc
  1344. { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if
  1345. PostCommonFunc } def
  1346. /EvalFunc_asin {%
  1347. PreCommonFunc
  1348. { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
  1349. PostCommonFunc } def
  1350. /EvalFunc_acos {%
  1351. PreCommonFunc
  1352. { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
  1353. PostCommonFunc } def
  1354. /EvalFunc_atg {%
  1355. PreCommonFunc
  1356. { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
  1357. PostCommonFunc } def
  1358. /EvalFunc_ln {%
  1359. PreCommonFunc
  1360. { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if
  1361. PostCommonFunc } def
  1362. /EvalFunc_exp {%
  1363. PreCommonFunc
  1364. { (exp\() StrConcat 5 index StrConcat AddClPar } if
  1365. PostCommonFunc } def
  1366. /EvalFunc_sqrt {%
  1367. PreCommonFunc
  1368. { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if
  1369. PostCommonFunc } def
  1370. /EvalFunc_Fact {%
  1371. PreCommonFunc { ERROR_no_variable_expression_in_Fact } if
  1372. PostCommonFunc } def
  1373. /EvalFunc_sh {%
  1374. PreCommonFunc
  1375. { (ch\() StrConcat 5 index StrConcat AddClPar } if
  1376. PostCommonFunc } def
  1377. /EvalFunc_ch {%
  1378. PreCommonFunc
  1379. { (sh\() StrConcat 5 index StrConcat AddClPar } if
  1380. PostCommonFunc } def
  1381. /EvalFunc_th {%
  1382. PreCommonFunc
  1383. { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if
  1384. PostCommonFunc } def
  1385. /EvalFunc_Argsh {%
  1386. PreCommonFunc
  1387. { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
  1388. PostCommonFunc } def
  1389. /EvalFunc_Argch {%
  1390. PreCommonFunc
  1391. { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if
  1392. PostCommonFunc } def
  1393. /EvalFunc_Argth {%
  1394. PreCommonFunc
  1395. { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if
  1396. PostCommonFunc } def
  1397. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1398. /PreCommonFunc {
  1399. 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop
  1400. 4 2 roll 4 index (0) eq
  1401. { (0) StrConcat false }
  1402. { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse
  1403. } def
  1404. /PostCommonFunc {
  1405. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1406. mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1407. } def
  1408. /EvalFunc_Derive {%
  1409. 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs
  1410. 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add
  1411. 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar
  1412. 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval
  1413. exch 6 2 roll } def
  1414. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1415. %% literal switch -> func call, vector, variables
  1416. /EvalFunc_Sum {%
  1417. 1 add NextNonBlankChar pop
  1418. %% read the variable name
  1419. ReadLiteral pop 3 -1 roll pop NextNonBlankChar
  1420. 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if
  1421. %% read the initial value
  1422. 1 add NextNonBlankChar pop ReadNumber pop
  1423. 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if
  1424. %% read the increment value
  1425. 1 add NextNonBlankChar pop ReadNumber pop
  1426. 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if
  1427. %% read the limit value
  1428. 1 add NextNonBlankChar pop ReadNumber pop
  1429. 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if
  1430. 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop
  1431. 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat
  1432. 4 index StrConcat AddClPar
  1433. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1434. mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1435. } def
  1436. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1437. %% literal switch -> func call, vector, variables
  1438. /EvalFunc_IfTE {%
  1439. 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond
  1440. NextNonBlankChar
  1441. 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if
  1442. 1 add NextNonBlankChar pop dup 5 1 roll
  1443. AnalyzeExpr NextNonBlankChar
  1444. 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if
  1445. 1 add NextNonBlankChar pop
  1446. AnalyzeExpr 1 add NextNonBlankChar pop
  1447. 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat
  1448. 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar
  1449. 2 copy pop 0 6 2 roll GetIntervalNewStr
  1450. mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll
  1451. } def
  1452. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1453. %% advance in str until a comma is found (no error detection!)
  1454. %% str index -> str index'
  1455. /SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def
  1456. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1457. %% Convert to radians if trigo function call
  1458. %% (name) ->
  1459. /TrigoFunc {
  1460. dup (cos) eq 1 index (sin) eq or exch (tan) eq or
  1461. { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add
  1462. array astore def
  1463. } if
  1464. } def
  1465. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1466. %% No derivative for condition....
  1467. /EvalCondOp { 3 -1 roll pop } bind def
  1468. /PutIntervalOneAdd {putinterval 1 add} bind def
  1469. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1470. %% Add open parenthesis in string at the given index
  1471. %% str index -> str index+1
  1472. /AddOpPar {2 copy (\() PutIntervalOneAdd} bind def
  1473. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1474. %% Add close parenthesis in string at the given index
  1475. %% str index -> str index+1
  1476. /AddClPar {2 copy (\)) PutIntervalOneAdd} bind def
  1477. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1478. %% Add 0 in string at the given index
  1479. %% str index -> str index+1
  1480. /AddZero {2 copy (0) PutIntervalOneAdd} bind def
  1481. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1482. %% Add open parenthesis in string at the given index
  1483. %% str index -> str index+1
  1484. /AddMul {2 copy (*) PutIntervalOneAdd} bind def
  1485. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1486. %% Add open parenthesis in string at the given index
  1487. %% str index -> str index+1
  1488. /AddDiv {2 copy (/) PutIntervalOneAdd} bind def
  1489. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1490. %% Add a plus sign in string at the given index
  1491. %% str index -> str index+1
  1492. /AddAdd {2 copy (+) PutIntervalOneAdd} bind def
  1493. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1494. %% Add a minus sign in string at the given index
  1495. %% str index -> str index+1
  1496. /AddSub {2 copy (-) PutIntervalOneAdd} bind def
  1497. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1498. %% Add a pipe sign in string at the given index
  1499. %% str index -> str index+1
  1500. /AddPipe {2 copy (|) PutIntervalOneAdd} bind def
  1501. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1502. %% H O O K S
  1503. /AnalyzePreHook { dup 5 1 roll } bind def
  1504. /PreEvalHook {} def
  1505. /AnalyzePostHook { 7 -1 roll pop } bind def
  1506. /AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def
  1507. /RollOp { 5 1 roll } bind def
  1508. end%%%tx@CoreAnalyzerDict
  1509. /tx@AddMathFunc 12 dict def tx@AddMathFunc begin
  1510. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1511. %% NEW FUNC
  1512. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1513. %% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2))
  1514. %% x -> theta
  1515. /asin {%
  1516. dup abs 1 gt { EQDFasinrangeerror } if
  1517. dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad
  1518. } def
  1519. %% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x)
  1520. %% x -> theta
  1521. /acos {%
  1522. dup abs 1 gt { EQDFacosrangeerror } if
  1523. dup dup mul 1 exch sub sqrt exch atan DegtoRad
  1524. } def
  1525. %% function arctangent in radians
  1526. %% x -> theta
  1527. /atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def
  1528. %% HYPERBOLIC FUNCTIONS
  1529. /sh { dup Ex exch neg Ex sub 2 div } def
  1530. /ch { dup Ex exch neg Ex add 2 div } def
  1531. /th { dup sh exch ch div } def
  1532. /Argsh { dup dup mul 1 add sqrt add ln } def
  1533. /Argch { dup dup mul 1 sub sqrt add ln } def
  1534. /Argth { dup 1 add exch 1 exch sub div ln 2 div } def
  1535. %% modified exponential funtion for 0
  1536. %% x n -> x^n
  1537. /Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def
  1538. %% modified exponential funtion for 0
  1539. %% x -> e^x
  1540. /Ex { Euler exch exp } bind def
  1541. %%
  1542. %% factorial function
  1543. %% n -> n!
  1544. /Fact { 1 exch 2 exch 1 exch { mul } for } bind def
  1545. /fact { Fact } bind def
  1546. end
  1547.  
  1548. % END pstricks.pro
  1549.  
  1550. %%EndProcSet
  1551. %%BeginProcSet: pst-dots.pro 0 0
  1552. % $Id: pst-dots.pro 26 2008-06-14 11:50:02Z herbert $
  1553. %
  1554. %% PostScript prologue for pstricks.tex.
  1555. %% Version 2.02, 2008/04/18
  1556. %%
  1557. %% For distribution, see pstricks.tex.
  1558. %%
  1559. %% Timothy Van Zandt <tvz@Princeton.EDU>
  1560. %%
  1561. %% This program can be redistributed and/or modified under the terms
  1562. %% of the LaTeX Project Public License Distributed from CTAN archives
  1563. %% in directory macros/latex/base/lppl.txt.
  1564. %%
  1565. %% Modified by Etienne Riga - Dec. 16, 1999
  1566. %% Modified by Etienne Riga - 2005/01/01 (er)
  1567. %% to add /Diamond, /SolidDiamond and /BoldDiamond
  1568. %% Modified by Herbert Voss (hv) - 2008/04/17
  1569. %
  1570. 10 dict dup begin % hold local
  1571. /FontType 3 def
  1572. /FontMatrix [.001 0 0 .001 0 0] def
  1573. /FontBBox [-571.5 -742.5 571.5 742.5] def
  1574. % /FontBBox [-1000 -1000 1000 1000] def % See end of file in /BuildGlyph
  1575. /Encoding 256 array def
  1576. 0 1 255 {Encoding exch /.notdef put} for % fill the array with /.notdef
  1577. Encoding % replace with given dot names
  1578. dup (b) 0 get /Bullet put % get the numerical position of b in ASCII
  1579. % % and save /Bullet at this place in Encoding
  1580. dup (c) 0 get /Circle put
  1581. dup (C) 0 get /BoldCircle put % 67
  1582. dup (u) 0 get /SolidTriangle put
  1583. dup (t) 0 get /Triangle put
  1584. dup (T) 0 get /BoldTriangle put
  1585. dup (r) 0 get /SolidSquare put
  1586. dup (s) 0 get /Square put
  1587. dup (S) 0 get /BoldSquare put
  1588. dup (q) 0 get /SolidPentagon put
  1589. dup (p) 0 get /Pentagon put
  1590. dup (P) 0 get /BoldPentagon put
  1591. %%%
  1592. dup (k) 0 get /Asterisk put
  1593. dup (K) 0 get /BoldAsterisk put
  1594. dup (J) 0 get /SolidAsterisk put
  1595. dup (h) 0 get /Hexagon put
  1596. dup (H) 0 get /BoldHexagon put
  1597. dup (G) 0 get /SolidHexagon put
  1598. dup (f) 0 get /Octogon put % 2008-04-18 hv
  1599. dup (F) 0 get /BoldOctogon put % 2008-04-18 hv
  1600. dup (g) 0 get /SolidOctogon put % 2008-04-18 hv
  1601. dup (a) 0 get /Add put
  1602. dup (A) 0 get /BoldAdd put % 65
  1603. dup (x) 0 get /Mul put
  1604. dup (X) 0 get /BoldMul put
  1605. dup (m) 0 get /Oplus put
  1606. dup (M) 0 get /BOplus put
  1607. dup (e) 0 get /SolidOplus put
  1608. dup (n) 0 get /Otimes put
  1609. dup (N) 0 get /BOtimes put
  1610. dup (E) 0 get /SolidOtimes put
  1611. dup (i) 0 get /Bar put
  1612. dup (I) 0 get /BoldBar put
  1613. dup (l) 0 get /SolidDiamond put
  1614. dup (d) 0 get /Diamond put
  1615. (D) 0 get /BoldDiamond put
  1616. %%%
  1617. /CharProcs 47 dict def
  1618. CharProcs begin
  1619. /CirclePath {0 0 500 0 360 arc closepath} def
  1620. /Bullet {CirclePath fill} def
  1621. /Circle {CirclePath .9 .9 scale CirclePath eofill} def
  1622. /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def
  1623. /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto closepath} def
  1624. /SolidTriangle {TrianglePath fill} def
  1625. /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def
  1626. /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def
  1627. /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto closepath} def
  1628. /SolidSquare {SquarePath fill} def
  1629. /Square {SquarePath .89 .89 scale SquarePath eofill} def
  1630. /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def
  1631. /PentagonPath {
  1632. -337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto
  1633. 0 574.7 lineto -546.6 177.6 lineto closepath
  1634. } def
  1635. /SolidPentagon {PentagonPath fill} def
  1636. /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def
  1637. /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def
  1638. %-------------- hv begin 2004/07/25 from: er 2003/03/24
  1639. /HexagonPath {
  1640. 0 550 moveto -476 275 lineto -476 -275 lineto
  1641. 0 -550 lineto 476 -275 lineto 476 275 lineto closepath
  1642. } def
  1643. /SolidHexagon {HexagonPath fill} def
  1644. /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def
  1645. /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def
  1646. % 2008-04-18 hv
  1647. /OctogonPath {
  1648. 550 dup 22.5 tan mul dup neg dup add /xMove exch def
  1649. exch moveto 7 { xMove 0 rlineto 45 rotate } repeat closepath } def
  1650. /SolidOctogon { OctogonPath fill } def
  1651. /Octogon { OctogonPath .89 .89 scale OctogonPath eofill } def
  1652. /BoldOctogon { OctogonPath .79 .79 scale OctogonPath eofill } def
  1653. %
  1654. /AsteriskPath {
  1655. 20 0 moveto 10 250 180 500 0 500 curveto
  1656. -180 500 -10 250 -20 0 curveto closepath
  1657. } def
  1658. /Asterisk {
  1659. AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath
  1660. 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath fill
  1661. } def
  1662. %
  1663. /Basterp {50 250 220 500 0 500 curveto -220 500 -50 250 -50 30 cos 100 mul curveto} def
  1664. /BoldAsteriskPath {
  1665. 50 30 cos 100 mul moveto Basterp
  1666. 60 rotate Basterp 60 rotate Basterp
  1667. 60 rotate Basterp 60 rotate Basterp
  1668. 60 rotate Basterp closepath
  1669. } def
  1670. /BoldAsterisk {BoldAsteriskPath fill} def
  1671. /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def
  1672. /CrossPath {
  1673. 40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto
  1674. -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto
  1675. 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath
  1676. } def
  1677. /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto
  1678. -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto
  1679. 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath
  1680. } def
  1681. /Add {CrossPath fill} def
  1682. /Mul {45 rotate CrossPath fill} def
  1683. /BoldAdd {BoldCrossPath fill} def
  1684. /BoldMul {45 rotate BoldCrossPath fill} def
  1685. /Oplus {CirclePath .9 .9 scale CirclePath eofill .775 .775 scale CrossPath fill } def
  1686. /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def
  1687. /BOplus {CirclePath .8 .8 scale CirclePath eofill .775 .775 scale BoldCrossPath fill} def
  1688. /Otimes {CirclePath .9 .9 scale CirclePath eofill 45 rotate .775 .775 scale CrossPath fill} def
  1689. /BOtimes {CirclePath .8 .8 scale CirclePath eofill 45 rotate .775 .775 scale BoldCrossPath fill } def
  1690. /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def
  1691. /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto closepath} def
  1692. /Bar {BarPath fill} def
  1693. /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto closepath} def
  1694. /BoldBar {BoldBarPath fill} def
  1695. /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto 428.5 0 lineto closepath} def
  1696. /SolidDiamond {DiamondPath fill} def
  1697. /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def
  1698. /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def
  1699. %%%
  1700. /.notdef { } def
  1701. end
  1702. %
  1703. /BuildGlyph {
  1704. exch
  1705. begin
  1706. % Metrics 1 index get exec 0
  1707. 0 0
  1708. % BBoxes 3 index get exec
  1709. -1000 -1000 1000 1000
  1710. % -571.5 -742.5 571.5 742.5
  1711. setcachedevice
  1712. CharProcs begin load exec end
  1713. end
  1714. } def
  1715. %
  1716. /BuildChar {
  1717. 1 index /Encoding get exch get
  1718. 1 index /BuildGlyph get exec
  1719. } bind def
  1720.  
  1721. end
  1722. /PSTricksDotFont exch definefont pop
  1723.  
  1724. %% end
  1725.  
  1726. %%EndProcSet
  1727. %%BeginProcSet: special.pro 0 0
  1728. %!
  1729. TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
  1730. /vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
  1731. /rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
  1732. /@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
  1733. /hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
  1734. X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
  1735. /@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
  1736. /urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
  1737. {userdict/md get type/dicttype eq{userdict begin md length 10 add md
  1738. maxlength ge{/md md dup length 20 add dict copy def}if end md begin
  1739. /letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
  1740. atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
  1741. itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
  1742. transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
  1743. curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
  1744. pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
  1745. if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
  1746. -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
  1747. get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
  1748. yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
  1749. neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
  1750. noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
  1751. 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
  1752. neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
  1753. 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
  1754. 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
  1755. -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
  1756. TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
  1757. Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
  1758. }if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
  1759. save N userdict maxlength dict begin/magscale true def normalscale
  1760. currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
  1761. /psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
  1762. psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
  1763. psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
  1764. TR/showpage{}N/erasepage{}N/setpagedevice{pop}N/copypage{}N/p 3 def
  1765. @MacSetUp}N/doclip{psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll
  1766. newpath 4 copy 4 2 roll moveto 6 -1 roll S lineto S lineto S lineto
  1767. closepath clip newpath moveto}N/endTexFig{end psf$SavedState restore}N
  1768. /@beginspecial{SDict begin/SpecialSave save N gsave normalscale
  1769. currentpoint TR @SpecialDefaults count/ocount X/dcount countdictstack N}
  1770. N/@setspecial{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs
  1771. neg 0 rlineto closepath clip}if ho vo TR hsc vsc scale ang rotate
  1772. rwiSeen{rwi urx llx sub div rhiSeen{rhi ury lly sub div}{dup}ifelse
  1773. scale llx neg lly neg TR}{rhiSeen{rhi ury lly sub div dup scale llx neg
  1774. lly neg TR}if}ifelse CLIP 2 eq{newpath llx lly moveto urx lly lineto urx
  1775. ury lineto llx ury lineto closepath clip}if/showpage{}N/erasepage{}N
  1776. /setpagedevice{pop}N/copypage{}N newpath}N/@endspecial{count ocount sub{
  1777. pop}repeat countdictstack dcount sub{end}repeat grestore SpecialSave
  1778. restore end}N/@defspecial{SDict begin}N/@fedspecial{end}B/li{lineto}B
  1779. /rl{rlineto}B/rc{rcurveto}B/np{/SaveX currentpoint/SaveY X N 1
  1780. setlinecap newpath}N/st{stroke SaveX SaveY moveto}N/fil{fill SaveX SaveY
  1781. moveto}N/ellipse{/endangle X/startangle X/yrad X/xrad X/savematrix
  1782. matrix currentmatrix N TR xrad yrad scale 0 0 1 startangle endangle arc
  1783. savematrix setmatrix}N end
  1784.  
  1785. %%EndProcSet
  1786. TeXDict begin @defspecial
  1787.  
  1788. /preview@version(11.86)def
  1789.  
  1790. userdict begin/preview-bop-level 0 def/bop-hook{/preview-bop-level
  1791. dup load dup 0 le{/isls false def/vsize 792 def/hsize 612 def}if 1
  1792. add store}bind def/eop-hook{/preview-bop-level dup load dup 0 gt{1
  1793. sub}if store}bind def end
  1794.  
  1795. /preview@tightpage true def (compatibility PostScript comment for dvipng<=1.5
  1796.  
  1797. userdict begin/bop-hook{7{currentfile token not{stop}if 65781.76 div
  1798. DVImag mul}repeat 72 add 72 2 copy gt{exch}if 4 2 roll neg 2 copy lt{exch}if
  1799. dup 0 gt{pop 0 exch}{exch dup 0 lt{pop 0}if}ifelse 720 add exch 720
  1800. add 3 1 roll 4{5 -1 roll add 4 1 roll}repeat <</PageSize[5 -1 roll
  1801. 6 index sub 5 -1 roll 5 index sub]/PageOffset[7 -2 roll [1 1 dtransform
  1802. exch]{0 ge{neg}if exch}forall]>>setpagedevice//bop-hook exec}bind def
  1803. end
  1804.  
  1805. userdict (some extra code to avoid dvipng>=1.6 unknown special: 7{currentfile token not{stop}if 65781.76 div }))
  1806. pop
  1807.  
  1808. userdict begin/bop-hook{preview-bop-level 0 le{7{currentfile token
  1809. not{stop}if 65781.76 div DVImag mul}repeat 72 add 72 2 copy gt{exch}if
  1810. 4 2 roll neg 2 copy lt{exch}if dup 0 gt{pop 0 exch}{exch dup 0 lt{pop
  1811. 0}if}ifelse 720 add exch 720 add 3 1 roll 4{5 -1 roll add 4 1 roll}repeat
  1812. <</PageSize[5 -1 roll 6 index sub 5 -1 roll 5 index sub]/PageOffset[7
  1813. -2 roll [1 1 dtransform exch]{0 ge{neg}if exch}forall]>>setpagedevice}if//bop-hook
  1814. exec}bind def end
  1815. @fedspecial end TeXDict begin
  1816. 23867906 17900936 1000 600 600 (mchrzasz.dvi) @start
  1817. end
  1818. %%EndProlog
  1819. %%BeginSetup
  1820. %%Feature: *Resolution 600dpi
  1821. TeXDict begin
  1822. % dvips-unknown
  1823. statusdict /setpageparams known { hsize vsize 0 1 statusdict begin {
  1824. setpageparams } stopped end } { true } ifelse { statusdict /setpage known
  1825. { hsize vsize 1 statusdict begin { setpage } stopped pop end } if } if
  1826. end
  1827. %%EndSetup
  1828. %%Page: 1 1
  1829. TeXDict begin 1 0 bop
  1830. -32891 -32891 32891 32891 9867264 0 13156352
  1831. 0 0 a @beginspecial 0 @llx 0 @lly
  1832. 200 @urx 150 @ury 2000 @rwi @setspecial
  1833. %%BeginDocument: sm.1
  1834. %!PS
  1835. %%BoundingBox: 0 0 200 150
  1836. %%HiResBoundingBox: 0 0 199.25232 149.43924
  1837. %%Creator: MetaPost 1.504
  1838. %%CreationDate: 2014.04.14:1507
  1839. %%Pages: 1
  1840. %%BeginProlog
  1841. %%EndProlog
  1842. %%Page: 1 1
  1843. 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop
  1844. [] 0 setdash 1 setlinejoin 10 setmiterlimit
  1845. newpath 99.62617 22.831 moveto
  1846. 103.14857 26.3534 lineto
  1847. 99.62617 22.831 lineto
  1848. 96.10378 26.3534 lineto
  1849. 99.62617 22.831 lineto
  1850. 96.10378 19.3086 lineto
  1851. 99.62617 22.831 lineto
  1852. 103.14857 19.3086 lineto
  1853. closepath
  1854. gsave fill grestore stroke
  1855. 1 setlinecap
  1856. newpath 0 56.0397 moveto
  1857. 66.41745 56.0397 lineto stroke
  1858. newpath 29.81592 53.10509 moveto
  1859. 40.76817 56.0397 lineto
  1860. 29.81592 58.97432 lineto
  1861. closepath fill
  1862. newpath 199.25232 93.39954 moveto
  1863. 101.43755 101.89038 lineto stroke
  1864. newpath 153.97949 100.27538 moveto
  1865. 142.8134 98.29875 lineto
  1866. 153.47186 94.42763 lineto
  1867. closepath fill
  1868. newpath 79.70093 56.0397 moveto
  1869. 78.4191 57.89537 79.62675 60.44278 81.87471 60.62505 curveto
  1870. 84.12234 60.8073 85.32982 63.35432 84.04817 65.20972 curveto
  1871. 82.76634 67.06537 83.97401 69.61278 86.22198 69.79504 curveto
  1872. 88.4696 69.97728 89.67708 72.5243 88.39545 74.37968 curveto
  1873. 87.1136 76.23537 88.32127 78.78279 90.56924 78.96506 curveto
  1874. 92.8172 79.14732 94.02486 81.69473 92.74303 83.5504 curveto
  1875. 91.4614 85.40578 92.66887 87.9528 94.91649 88.13504 curveto
  1876. 97.16446 88.3173 98.37213 90.86472 97.0903 92.72037 curveto
  1877. 95.80865 94.57576 97.01613 97.12279 99.26376 97.30504 curveto
  1878. 101.51172 97.4873 102.71939 100.03473 101.43755 101.89038 curveto stroke
  1879. newpath 101.43755 101.89038 moveto
  1880. 199.25232 130.75932 lineto stroke
  1881. newpath 147.92079 112.54967 moveto
  1882. 157.5939 118.4643 lineto
  1883. 146.25941 118.17879 lineto
  1884. closepath fill
  1885. newpath 66.41745 56.0397 moveto
  1886. 70.56854 56.0397 lineto stroke
  1887. newpath 74.71964 56.0397 moveto
  1888. 78.87073 56.0397 lineto stroke
  1889. newpath 83.02182 56.0397 moveto
  1890. 87.17291 56.0397 lineto stroke
  1891. newpath 91.324 56.0397 moveto
  1892. 95.4751 56.0397 lineto stroke
  1893. newpath 99.62619 56.0397 moveto
  1894. 103.77724 56.0397 lineto stroke
  1895. newpath 107.92833 56.0397 moveto
  1896. 112.07942 56.0397 lineto stroke
  1897. newpath 116.23051 56.0397 moveto
  1898. 120.3816 56.0397 lineto stroke
  1899. newpath 124.5327 56.0397 moveto
  1900. 128.68379 56.0397 lineto stroke
  1901. newpath 66.41745 56.0397 moveto
  1902. 66.41745 37.69904 81.2855 22.831 99.62617 22.831 curveto
  1903. 117.96684 22.831 132.83488 37.69904 132.83488 56.0397 curveto stroke
  1904. newpath 132.83488 56.0397 moveto
  1905. 199.25232 56.0397 lineto stroke
  1906. newpath 162.6508 53.10509 moveto
  1907. 173.60304 56.0397 lineto
  1908. 162.6508 58.97432 lineto
  1909. closepath fill
  1910. showpage
  1911. %%EOF
  1912.  
  1913. %%EndDocument
  1914. @endspecial eop end
  1915. %%Trailer
  1916.  
  1917. userdict /end-hook known{end-hook}if
  1918. %%EOF