diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/lnotes/src/examples')
36 files changed, 0 insertions, 32284 deletions
diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/arrow.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/arrow.mps deleted file mode 100644 index 7aa8b8630ea..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/arrow.mps +++ /dev/null @@ -1,39 +0,0 @@ -%!PS -%%BoundingBox: -1 -3 91 42 -%%HiResBoundingBox: -0.49814 -2.02908 90.16168 41.87955 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 39.85046 moveto -89.66354 39.85046 lineto stroke -newpath 85.96759 38.31952 moveto -89.66354 39.85046 lineto -85.96759 41.38141 lineto - closepath -gsave fill grestore stroke -newpath 89.66354 19.92523 moveto -0 19.92523 lineto stroke -newpath 3.69595 21.45618 moveto -0 19.92523 lineto -3.69595 18.39429 lineto - closepath -gsave fill grestore stroke -newpath 0 0 moveto -89.66354 0 lineto stroke -newpath 85.96759 -1.53094 moveto -89.66354 0 lineto -85.96759 1.53094 lineto - closepath -gsave fill grestore stroke -newpath 3.69595 1.53094 moveto -0 0 lineto -3.69595 -1.53094 lineto - closepath -gsave fill grestore stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/color.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/color.mps deleted file mode 100644 index f7e983c4285..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/color.mps +++ /dev/null @@ -1,21 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 91 41 -%%HiResBoundingBox: -0.49814 -0.49814 90.16168 40.3486 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 1 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 39.85046 moveto -89.66354 39.85046 lineto stroke - 0 1 0 setrgbcolor -newpath 0 19.92523 moveto -89.66354 19.92523 lineto stroke - 0 0 1 setrgbcolor -newpath 0 0 moveto -89.66354 0 lineto stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/colors.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/colors.mps deleted file mode 100644 index 9e3c1c1c158..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/colors.mps +++ /dev/null @@ -1,46 +0,0 @@ -%!PS -%%BoundingBox: 0 0 200 18 -%%HiResBoundingBox: 0 0 200 17.31995 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.04.29:1049 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 1 1 0 setrgbcolor -newpath 0 0 moveto -20 0 lineto -10 17.31995 lineto - closepath fill - 0 1 1 setrgbcolor -newpath 30 0 moveto -50 0 lineto -40 17.31995 lineto - closepath fill - 1 0 1 setrgbcolor -newpath 60 0 moveto -80 0 lineto -70 17.31995 lineto - closepath fill - 0.6 0.6 0.6 setrgbcolor -newpath 90 0 moveto -110 0 lineto -100 17.31995 lineto - closepath fill - 0.6 0 0 setrgbcolor -newpath 120 0 moveto -140 0 lineto -130 17.31995 lineto - closepath fill - 0 0.6 0 setrgbcolor -newpath 150 0 moveto -170 0 lineto -160 17.31995 lineto - closepath fill - 0 0 0.6 setrgbcolor -newpath 180 0 moveto -200 0 lineto -190 17.31995 lineto - closepath fill -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/curve.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/curve.mps deleted file mode 100644 index fd472cc417a..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/curve.mps +++ /dev/null @@ -1,73 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 101 37 -%%HiResBoundingBox: -0.99626 -0.99626 100.62242 36.13666 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 4.98131 moveto -16.40726 13.67198 33.01619 21.97644 49.81308 29.88785 curveto -75.80037 42.12796 102.70006 33.749 99.62616 14.94392 curveto -97.65355 2.87622 83.23093 -0.60013 69.73831 0 curveto -58.50563 0.49962 47.8245 5.95982 49.81308 14.94392 curveto -52.17368 25.60869 67.37772 25.60869 69.73831 14.94392 curveto stroke -newpath 0.99626 4.98131 moveto -0.99626 5.24553 0.8913 5.49895 0.70447 5.68578 curveto -0.51764 5.8726 0.26422 5.97757 0 5.97757 curveto --0.26422 5.97757 -0.51764 5.8726 -0.70447 5.68578 curveto --0.8913 5.49895 -0.99626 5.24553 -0.99626 4.98131 curveto --0.99626 4.71709 -0.8913 4.46367 -0.70447 4.27684 curveto --0.51764 4.09001 -0.26422 3.98505 0 3.98505 curveto -0.26422 3.98505 0.51764 4.09001 0.70447 4.27684 curveto -0.8913 4.46367 0.99626 4.71709 0.99626 4.98131 curveto closepath fill -newpath 50.80934 29.88785 moveto -50.80934 30.15207 50.70438 30.40549 50.51755 30.59232 curveto -50.33072 30.77914 50.0773 30.88411 49.81308 30.88411 curveto -49.54886 30.88411 49.29544 30.77914 49.10861 30.59232 curveto -48.92178 30.40549 48.81682 30.15207 48.81682 29.88785 curveto -48.81682 29.62363 48.92178 29.37021 49.10861 29.18338 curveto -49.29544 28.99655 49.54886 28.89159 49.81308 28.89159 curveto -50.0773 28.89159 50.33072 28.99655 50.51755 29.18338 curveto -50.70438 29.37021 50.80934 29.62363 50.80934 29.88785 curveto closepath fill -newpath 100.62242 14.94392 moveto -100.62242 15.20815 100.51746 15.46156 100.33063 15.64839 curveto -100.1438 15.83522 99.89038 15.94019 99.62616 15.94019 curveto -99.36194 15.94019 99.10852 15.83522 98.92169 15.64839 curveto -98.73486 15.46156 98.6299 15.20815 98.6299 14.94392 curveto -98.6299 14.6797 98.73486 14.42628 98.92169 14.23946 curveto -99.10852 14.05263 99.36194 13.94766 99.62616 13.94766 curveto -99.89038 13.94766 100.1438 14.05263 100.33063 14.23946 curveto -100.51746 14.42628 100.62242 14.6797 100.62242 14.94392 curveto closepath fill -newpath 70.73457 0 moveto -70.73457 0.26422 70.62961 0.51764 70.44278 0.70447 curveto -70.25595 0.8913 70.00253 0.99626 69.73831 0.99626 curveto -69.47409 0.99626 69.22067 0.8913 69.03384 0.70447 curveto -68.84702 0.51764 68.74205 0.26422 68.74205 0 curveto -68.74205 -0.26422 68.84702 -0.51764 69.03384 -0.70447 curveto -69.22067 -0.8913 69.47409 -0.99626 69.73831 -0.99626 curveto -70.00253 -0.99626 70.25595 -0.8913 70.44278 -0.70447 curveto -70.62961 -0.51764 70.73457 -0.26422 70.73457 0 curveto closepath fill -newpath 50.80934 14.94392 moveto -50.80934 15.20815 50.70438 15.46156 50.51755 15.64839 curveto -50.33072 15.83522 50.0773 15.94019 49.81308 15.94019 curveto -49.54886 15.94019 49.29544 15.83522 49.10861 15.64839 curveto -48.92178 15.46156 48.81682 15.20815 48.81682 14.94392 curveto -48.81682 14.6797 48.92178 14.42628 49.10861 14.23946 curveto -49.29544 14.05263 49.54886 13.94766 49.81308 13.94766 curveto -50.0773 13.94766 50.33072 14.05263 50.51755 14.23946 curveto -50.70438 14.42628 50.80934 14.6797 50.80934 14.94392 curveto closepath fill -newpath 70.73457 14.94392 moveto -70.73457 15.20815 70.62961 15.46156 70.44278 15.64839 curveto -70.25595 15.83522 70.00253 15.94019 69.73831 15.94019 curveto -69.47409 15.94019 69.22067 15.83522 69.03384 15.64839 curveto -68.84702 15.46156 68.74205 15.20815 68.74205 14.94392 curveto -68.74205 14.6797 68.84702 14.42628 69.03384 14.23946 curveto -69.22067 14.05263 69.47409 13.94766 69.73831 13.94766 curveto -70.00253 13.94766 70.25595 14.05263 70.44278 14.23946 curveto -70.62961 14.42628 70.73457 14.6797 70.73457 14.94392 curveto closepath fill -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/dashed.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/dashed.mps deleted file mode 100644 index da1c2c9aac0..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/dashed.mps +++ /dev/null @@ -1,24 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 101 31 -%%HiResBoundingBox: -0.49814 -0.49814 100.1243 30.38599 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [0 5 ] 2.5 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -99.62616 0 lineto stroke - [0 10 ] 5 setdash -newpath 0 9.96262 moveto -99.62616 9.96262 lineto stroke - [3 3 ] 0 setdash -newpath 0 19.92523 moveto -99.62616 19.92523 lineto stroke - [6 6 ] 0 setdash -newpath 0 29.88785 moveto -99.62616 29.88785 lineto stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/dot.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/dot.mps deleted file mode 100644 index f4a8777cc8b..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/dot.mps +++ /dev/null @@ -1,33 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 101 41 -%%HiResBoundingBox: -0.99626 -0.99626 100.62242 40.84673 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -99.62616 39.85046 lineto stroke -newpath 0.99626 0 moveto -0.99626 0.26422 0.8913 0.51764 0.70447 0.70447 curveto -0.51764 0.8913 0.26422 0.99626 0 0.99626 curveto --0.26422 0.99626 -0.51764 0.8913 -0.70447 0.70447 curveto --0.8913 0.51764 -0.99626 0.26422 -0.99626 0 curveto --0.99626 -0.26422 -0.8913 -0.51764 -0.70447 -0.70447 curveto --0.51764 -0.8913 -0.26422 -0.99626 0 -0.99626 curveto -0.26422 -0.99626 0.51764 -0.8913 0.70447 -0.70447 curveto -0.8913 -0.51764 0.99626 -0.26422 0.99626 0 curveto closepath fill -newpath 100.62242 39.85046 moveto -100.62242 40.11469 100.51746 40.3681 100.33063 40.55493 curveto -100.1438 40.74176 99.89038 40.84673 99.62616 40.84673 curveto -99.36194 40.84673 99.10852 40.74176 98.92169 40.55493 curveto -98.73486 40.3681 98.6299 40.11469 98.6299 39.85046 curveto -98.6299 39.58624 98.73486 39.33282 98.92169 39.146 curveto -99.10852 38.95917 99.36194 38.8542 99.62616 38.8542 curveto -99.89038 38.8542 100.1438 38.95917 100.33063 39.146 curveto -100.51746 39.33282 100.62242 39.58624 100.62242 39.85046 curveto closepath fill -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/fill.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/fill.mps deleted file mode 100644 index a47023aec18..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/fill.mps +++ /dev/null @@ -1,31 +0,0 @@ -%!PS -%%BoundingBox: 0 0 110 18 -%%HiResBoundingBox: 0 0 109.58878 17.2552 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor -newpath 0 0 moveto -19.92523 0 lineto -9.96262 17.2552 lineto - closepath fill - 1 0 0 setrgbcolor -newpath 29.88785 0 moveto -49.81308 0 lineto -39.85046 17.2552 lineto - closepath fill - 0 1 0 setrgbcolor -newpath 59.7757 0 moveto -79.70093 0 lineto -69.73831 17.2552 lineto - closepath fill - 0 0 1 setrgbcolor -newpath 89.66354 0 moveto -109.58878 0 lineto -99.62616 17.2552 lineto - closepath fill -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/label.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/label.mps deleted file mode 100644 index 79b3366a41b..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/label.mps +++ /dev/null @@ -1,45 +0,0 @@ -%!PS -%%BoundingBox: -44 -11 151 51 -%%HiResBoundingBox: -43.91557 -10.95567 150.48793 50.91548 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%*Font: cmr10 9.96265 9.96265 20:800000040000000027cdad -%*Font: cmmi10 9.96265 9.96265 45:80000002008 -%*Font: cmr7 6.97385 6.97385 32:8 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -99.62616 0 lineto -99.62616 39.85046 lineto -0 39.85046 lineto - closepath stroke -42.61781 44.78766 moveto -(top) cmr10 9.96265 fshow -34.03883 -9.9185 moveto -(bottom) cmr10 9.96265 fshow --17.1138 16.46597 moveto -(left) cmr10 9.96265 fshow -102.62616 17.43457 moveto -(right) cmr10 9.96265 fshow --43.91557 43.88763 moveto -(upper\040left) cmr10 9.96265 fshow -101.72615 43.88763 moveto -(upper\040right) cmr10 9.96265 fshow --42.25513 -9.0185 moveto -(lower\040left) cmr10 9.96265 fshow -101.72615 -9.0185 moveto -(lower\040right) cmr10 9.96265 fshow -32.88785 15.87042 moveto -(E) cmmi10 9.96265 fshow -43.58376 15.87042 moveto -(=) cmr10 9.96265 fshow -54.09985 15.87042 moveto -(mc) cmmi10 9.96265 fshow -67.15855 19.48582 moveto -(2) cmr7 6.97385 fshow -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/line.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/line.mps deleted file mode 100644 index d850ddacfd1..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/line.mps +++ /dev/null @@ -1,21 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 91 31 -%%HiResBoundingBox: -0.49814 -0.49814 90.16168 30.49814 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -40 0 lineto -20 30 lineto -0 0 lineto stroke -newpath 49.81308 0 moveto -89.66354 0 lineto -69.73831 29.88785 lineto - closepath stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/loop.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/loop.mps deleted file mode 100644 index 3a92a986b2c..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/loop.mps +++ /dev/null @@ -1,35 +0,0 @@ -%!PS -%%BoundingBox: -3 -3 101 41 -%%HiResBoundingBox: -2.02885 -2.02873 100.1243 40.3486 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -99.62616 0 lineto stroke -newpath 95.93106 -1.5306 moveto -99.62616 0 lineto -95.93106 1.5306 lineto - closepath -gsave fill grestore stroke - 0.99626 0 dtransform exch truncate exch idtransform pop setlinewidth -newpath 0 0 moveto -0 39.85046 lineto stroke - 0 0.99626 dtransform truncate idtransform setlinewidth pop -newpath 1.53072 36.15506 moveto -0 39.85046 lineto --1.53072 36.15506 lineto - closepath -gsave fill grestore stroke -newpath 0 0 moveto -2.4489 4.09131 5.8713 7.51372 9.96262 9.96262 curveto -13.81606 12.26913 18.12555 13.63078 22.4159 14.94392 curveto -28.19601 16.71304 33.99623 18.41885 39.85046 19.92523 curveto -47.26486 21.83307 54.75665 23.4187 62.26636 24.90654 curveto -71.37206 26.71059 80.50558 28.37123 89.66354 29.88785 curveto stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/path.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/path.mps deleted file mode 100644 index c0a995a3081..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/path.mps +++ /dev/null @@ -1,21 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 91 21 -%%HiResBoundingBox: -0.25 -0.25 90.25 20.25 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.04.24:1054 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.5 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -40 0 lineto -20 20 lineto -0 0 lineto stroke -newpath 50 0 moveto -90 0 lineto -70 20 lineto - closepath stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/predefined.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/predefined.mps deleted file mode 100644 index e52b4302c92..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/predefined.mps +++ /dev/null @@ -1,50 +0,0 @@ -%!PS -%%BoundingBox: -11 -11 190 11 -%%HiResBoundingBox: -10.46075 -10.46075 189.78784 10.46075 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinejoin 10 setmiterlimit -newpath 9.96262 0 moveto -9.96262 2.64236 8.91278 5.1762 7.0445 7.0445 curveto -5.1762 8.91278 2.64236 9.96262 0 9.96262 curveto --2.64236 9.96262 -5.1762 8.91278 -7.0445 7.0445 curveto --8.91278 5.1762 -9.96262 2.64236 -9.96262 0 curveto --9.96262 -2.64236 -8.91278 -5.1762 -7.0445 -7.0445 curveto --5.1762 -8.91278 -2.64236 -9.96262 0 -9.96262 curveto -2.64236 -9.96262 5.1762 -8.91278 7.0445 -7.0445 curveto -8.91278 -5.1762 9.96262 -2.64236 9.96262 0 curveto closepath stroke - 1 setlinecap -newpath 39.85046 0 moveto -39.85046 2.64236 38.80063 5.1762 36.93234 7.0445 curveto -35.06404 8.91278 32.53021 9.96262 29.88785 9.96262 curveto -27.24548 9.96262 24.71165 8.91278 22.84335 7.0445 curveto -20.97507 5.1762 19.92523 2.64236 19.92523 0 curveto stroke -newpath 59.7757 0 moveto -59.7757 2.64236 58.72586 5.1762 56.85757 7.0445 curveto -54.98927 8.91278 52.45544 9.96262 49.81308 9.96262 curveto stroke -newpath 109.58878 0 moveto -109.58878 2.64236 107.4891 5.1762 103.75252 7.0445 curveto -100.01593 8.91278 94.94827 9.96262 89.66354 9.96262 curveto -84.37881 9.96262 79.31116 8.91278 75.57457 7.0445 curveto -71.83798 5.1762 69.73831 2.64236 69.73831 0 curveto -69.73831 -2.64236 71.83798 -5.1762 75.57457 -7.0445 curveto -79.31116 -8.91278 84.37881 -9.96262 89.66354 -9.96262 curveto -94.94827 -9.96262 100.01593 -8.91278 103.75252 -7.0445 curveto -107.4891 -5.1762 109.58878 -2.64236 109.58878 0 curveto closepath stroke -newpath 119.55139 -9.96262 moveto -139.47662 -9.96262 lineto -139.47662 9.96262 lineto -119.55139 9.96262 lineto - closepath stroke -newpath 149.43924 -9.96262 moveto -189.2897 -9.96262 lineto -189.2897 9.96262 lineto -149.43924 9.96262 lineto - closepath stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_arc.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_arc.eps deleted file mode 100644 index d1b83e5818d..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_arc.eps +++ /dev/null @@ -1,1654 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_arc.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 646 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_arc.dvi -o pst_arc.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_arc.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 748 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def 10.0 0.0 /y ED /x ED /r 20.0 def /c 57.2957 r -Div def /angleA 0. 0.0 c mul 2 div add def /angleB 120. 0.0 c mul 2 -div sub def x y r angleA angleB arc gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def 50.0 0.0 /y ED /x ED /r 20.0 def /c 57.2957 r -Div def /angleA 120. 0.0 c mul 2 div sub def /angleB 0. 0.0 c mul 2 -div add def x y r angleA angleB arcn gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 90.0 0.0 2 copy moveto -20.0 .5 CLW mul sub 0. 120. arc closepath gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore end - -@endspecial 1 TeXcolorgray 0 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_arrow.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_arrow.eps deleted file mode 100644 index b1d955e9d3c..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_arrow.eps +++ /dev/null @@ -1,1657 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_arrow.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 626 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_arrow.dvi -o pst_arrow.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_arrow.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 772 748 333 v 1 TeXcolorgray -0 TeXcolorgray 639 772 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { BeginArrow 1. 1. scale false 0.4 1.4 1.5 2. 1. .setopacityalpha -Arrow EndArrow } def [ 90.0 40.0 0.0 40.0 /Lineto /lineto load -def false 0 setlinejoin Line gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { BeginArrow -1. 1. scale false 0.4 1.4 1.5 2. 1. .setopacityalpha Arrow EndArrow - moveto } def /ArrowB { } def [ 90.0 20.0 0.0 20.0 /Lineto /lineto -load def false 0 setlinejoin Line gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { BeginArrow -1. 1. scale false 0.4 1.4 1.5 2. 1. .setopacityalpha Arrow EndArrow - moveto } def /ArrowB { BeginArrow 1. 1. scale false 0.4 1.4 1.5 -2. 1. .setopacityalpha Arrow EndArrow } def [ 90.0 0.0 0.0 0.0 - /Lineto /lineto load def false 0 setlinejoin Line gsave 0.8 SLW -0 setgray 1. .setopacityalpha 0 setlinecap stroke grestore end - -@endspecial 1 TeXcolorgray 0 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_axis.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_axis.eps deleted file mode 100644 index 03a8cc91d31..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_axis.eps +++ /dev/null @@ -1,1828 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_axis.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 598 437 668 -%%DocumentFonts: CMR10 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_axis.dvi -o pst_axis.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: texps.pro 0 0 -%! -TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 -index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll -exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics -exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub -dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} -ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict -end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ -dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 -roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def -dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} -if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} -def end - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -%%BeginFont: CMR10 -%!PS-AdobeFont-1.1: CMR10 1.00B -%%CreationDate: 1992 Feb 19 19:54:52 -% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. -11 dict begin -/FontInfo 7 dict dup begin -/version (1.00B) readonly def -/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def -/FullName (CMR10) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -end readonly def -/FontName /CMR10 def -/PaintType 0 def -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0] readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 48 /zero put -dup 49 /one put -dup 50 /two put -dup 51 /three put -readonly def -/FontBBox{-251 -250 1009 969}readonly def -currentdict end -currentfile eexec -D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 -016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 -9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F -D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 -469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 -2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 -87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F -D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 -92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C -295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75 -409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C -4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF -2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E -0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E -B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008 -24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B -43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF -D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575 -5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC -96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3 -7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC390C98D93BE299A9CB -689CDA9BE6BEA47570D9D15DC614719507F27069622E7DB1A97F7B6FF5A5A0C5 -78162E7A9CF76FF72A34097236DF64DA4B61645C7326058030E2B5AABFCC44D0 -49E9CD83D81D8ECA953BDB8CA81CD3D122FAB35612C9C3F6C7F22B666462A78C -AC5473F8755B70B582C0D4C3C9D8C70EE755D41A42C8C17F066414DC21B33111 -A188A5FDDC2D6B02C0965CDC0D91DF1A487ABBBBE2E2896CE0B4BFBE38C79866 -BCD14C2C92449525BD879F6BC320C05FEF8BF68D616695ACD14B3594882B4914 -5B7569629AF50EBCF7152E3715510FBF60F1675D5259715B293A3D7E844764F8 -4B88D997BA5C7B7AB6B104E77F7769C22788334A91C91F02CE675DC14E1FDE5A -F8A03756C12F189494DBC735E3C86A6D4BC4D005E323AC4D7CEF6E1820F9F184 -4DD2EC4C5C58AEE4B5344077AFCCCD82CFC289D46552563B36DA5DAF3C179C90 -BBB4163F2E88909E040769367672B37254345F892D42DF5D5261EAB4CFD4745D -7D72D01D779DEA580D7AA0897250CB8CC10EF282B3A1899F63F375E39C44176C -B1800F024CFDDF2FEC7C789641235F8E7816E231C43CDF0CB9316BA6E9930DF5 -7C99BAAFA454F851D133CAD4BB57C68102A0BD4C98DE64A863370C5D44EFEB5F -1A4B1A409443658EA56CFFAC1782BDA5E2A54DCB34DA55FC192696FF9871FC5F -FFB6DD36E5B00F07626D5FCACD1B5FD50033BA914C46E6BABD0C145AEF060B51 -C8C368E2A4EC4FAEC44CF71C6B0E62796ACD326925183D2C0D637D29F508A8F2 -44BBA1E01D0CF933FDF7D5B283D717934A2A969C86BF5203CAF550AEBD3DD620 -90D649DFBB470E8DA5541F390594B1196A822A81498A104C46DEAA7018A747ED -C1DAD232E18B131027E10884C1D3AB6370FE8F72D8485DE73454B67E0FB9525D -252D132767CE3C5C66A035E7A1FC56CA303624B660D58F50D4F565B0B37D8397 -B71EA3067970D257647FDA1DCA03A2B7538216525ED8C4DDBE93EBEA781A965A -FF299553B6A6960D1CD70D86E7B6D9158E63F12E21EA7BD63D54E10A70B91346 -50ED25A89371A31B7AFF8C5710693DCF2EF9B1AAC1000992D015C630C0B65591 -D28B82903991BD380A2611106D7AA9225C8455236AB873CE60689EA9A7812F95 -A4FC0262F3130996802DE89631A7C10AF521BD51BF1AB1E12016388C7164C9EE -D7421ACBE3CD0E6C9EDD0B0C61A9AE9CF6EB5E48BAC28F32DD9AB140A1A6C60D -8F43E98E658716BEAFC7FA0FAAAEEBF9172558B3BB7497F5909F40C3251C7FDF -A06A9709C7564CFF5E58002F8AEDFFBC4A49B843667871ACD38023875A7206EB -28DB401B17AE6B229189569B8BA895E4F017C9C2847D4E5A38BA6BE06EB38284 -CD1F5D521223BB93C73E607F6A028B6FFAF1ED3D6CCD696D0EB5A219D72F570B -36AA5BC319F5765069B76EA7CB083D875E1797D191AE6D274CACB25206FBC4E3 -F3D87579D82FBE1EBFDC01EFE3208B1374B179C469F1B385212D52E225C23CCA -EB25925DCBE3A1257E9ACF7D47E56FC68C3866E6E292593EEC9FC4D805236D26 -8099F08D006C6ADF7EB43727FC89E71C2C372B716AAB3230E4FA2978D7D53D06 -7D84441473F6C4D19CC9846D72C8F95FBEBE84D1 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -%%EndFont -TeXDict begin 40258437 52099154 1000 600 600 (pst_axis.dvi) -@start /Fa 204[42 42 42 42 48[{}4 83.022 /CMR10 rf end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 1005 2392 565 v 1 TeXcolorgray -0 TeXcolorgray 805 839 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { BeginArrow -1. 1. scale false 0.4 1.4 1.5 2. 1. .setopacityalpha Arrow EndArrow - moveto } def /ArrowB { BeginArrow 1. 1. scale false 0.4 1.4 1.5 -2. 1. .setopacityalpha Arrow EndArrow } def 60.0 0 -20.0 0 -ArrowA CP 4 2 roll ArrowB L pop pop gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { BeginArrow -1. 1. scale false 0.4 1.4 1.5 2. 1. .setopacityalpha Arrow EndArrow - moveto } def /ArrowB { BeginArrow 1. 1. scale false 0.4 1.4 1.5 -2. 1. .setopacityalpha Arrow EndArrow } def 40.0 0 exch -20.0 - 0 exch ArrowA CP 4 2 roll ArrowB L pop pop gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0 rotate /n 2 def /dx -20.0 def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0 CLW 2 div -add def /y1 y2 neg def /x dx def n { x y1 moveto x y2 lineto stroke -/x x dx add def } repeat end - -@endspecial 951 962 a Fa(1)124 b(2)805 839 -y @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 90 rotate /n 1 def -/dx 20.0 def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0 CLW -2 div add def /y1 y2 neg def /x dx def n { x y1 moveto x y2 lineto -stroke /x x dx add def } repeat end - -@endspecial 694 699 a(1)1636 -839 y @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { BeginArrow -1. 1. scale 2 setlinecap 0 0 moveto 0 0.1 L stroke 0 0 moveto EndArrow - moveto } def /ArrowB { BeginArrow 1. 1. scale false 0.4 1.4 1.5 -2. 1. .setopacityalpha Arrow EndArrow } def 60.0 0 0.0 0 ArrowA -CP 4 2 roll ArrowB L pop pop gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { BeginArrow -1. 1. scale 2 setlinecap 0 0 moveto 0 0.1 L stroke 0 0 moveto EndArrow - moveto } def /ArrowB { BeginArrow 1. 1. scale false 0.4 1.4 1.5 -2. 1. .setopacityalpha Arrow EndArrow } def 40.0 0 exch 0.0 0 -exch ArrowA CP 4 2 roll ArrowB L pop pop gsave 0.8 SLW 0 setgray 1. -.setopacityalpha 0 setlinecap stroke grestore end - -@endspecial @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0 rotate /n 2 def /dx -20.0 def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0 CLW 2 div -add def /y1 y2 neg def /y1 0 def /x dx def n { x y1 moveto x y2 lineto -stroke /x x dx add def } repeat end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 90 rotate /n 1 def -/dx 20.0 def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0 CLW -2 div add def /y1 y2 neg def /y2 0 def /x dx def n { x y1 moveto x -y2 lineto stroke /x x dx add def } repeat end - -@endspecial 830 w @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0 0 moveto 60.0 0 L -0 40.0 2 copy rlineto L closepath gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0 rotate /n 3 def /dx -20.0 def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0 CLW 2 div -add def /y1 y2 neg def /y1 0 def /x dx def n { x y1 moveto x y2 lineto -stroke /x x dx add def } repeat end - -@endspecial -2445 937 a(0)g(1)g(2)g(3)2466 839 y @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 90 rotate /n 2 def -/dx 20.0 def n 0 lt { /dx dx neg def /n n neg def } if /y2 3.0 CLW -2 div add def /y1 y2 neg def /y2 0 def /x dx def n { x y1 moveto x -y2 lineto stroke /x x dx add def } repeat end - - -@endspecial 2379 865 a(0)2379 699 y(1)2379 533 y(2)p -1 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray -eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_bezier.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_bezier.eps deleted file mode 100644 index 0d27094bf3d..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_bezier.eps +++ /dev/null @@ -1,1644 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_bezier.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 646 209 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_bezier.dvi -o pst_bezier.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_bezier.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 499 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 60.0 20.0 40.0 0.0 20.0 20.0 0.0 0.0 true OpenBezier -BezierShowPoints gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore gsave /DS 2.0 2. CLW mul add 2 div def /PSTricksDotFont -0. [1.0 0.0 0.0 1.0 0.0 0.0] FontDot /Dot { moveto gsave 1. 1. scale -(b) show grestore } bind def newpath Points aload length 2 div 2 sub -cvi /N ED N 0 ge { Dot N { Dot } repeat Dot } { N 2 mul { pop } repeat -} ifelse grestore end - -@endspecial -1 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray -eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_circle.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_circle.eps deleted file mode 100644 index c4f2c4565b7..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_circle.eps +++ /dev/null @@ -1,1645 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_circle.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 646 219 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_circle.dvi -o pst_circle.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_circle.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 582 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 10.0 10.0 10.0 .5 -CLW mul sub 0 360 arc closepath gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0 360 20.0 10.0 .5 -CLW mul dup 4 -1 roll sub neg 3 1 roll sub 50.0 10.0 Ellipse closepath -gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap stroke -grestore end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_color.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_color.eps deleted file mode 100644 index 831316a4c5a..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_color.eps +++ /dev/null @@ -1,1653 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_color.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 626 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_color.dvi -o pst_color.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_color.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 772 748 333 v 1 TeXcolorgray -0 TeXcolorgray 639 772 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 1 0 0 setrgbcolor /ArrowA { moveto -} def /ArrowB { } def [ 90.0 40.0 0.0 40.0 /Lineto /lineto load def -false 0 setlinejoin Line gsave 0.8 SLW 1 0 0 setrgbcolor 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 1 0 setrgbcolor /ArrowA { moveto -} def /ArrowB { } def [ 90.0 20.0 0.0 20.0 /Lineto /lineto load def -false 0 setlinejoin Line gsave 0.8 SLW 0 1 0 setrgbcolor 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 0 1 setrgbcolor /ArrowA { moveto -} def /ArrowB { } def [ 90.0 0.0 0.0 0.0 /Lineto /lineto load def -false 0 setlinejoin Line gsave 0.8 SLW 0 0 1 setrgbcolor 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial 1 TeXcolorgray 0 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_curve.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_curve.eps deleted file mode 100644 index a6e9f00f490..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_curve.eps +++ /dev/null @@ -1,1667 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_curve.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 646 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_curve.dvi -o pst_curve.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_curve.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 748 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 10.0 0.0 40.0 20.0 30.0 0.0 10.0 20.0 0.0 10.0 - 1. 0.1 0. /c ED /b ED /a ED true OpenCurve gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore gsave /DS 2.0 2. -CLW mul add 2 div def /PSTricksDotFont 0. [1.0 0.0 0.0 1.0 0.0 0.0] -FontDot /Dot { moveto gsave 1. 1. scale (b) show grestore } bind -def newpath Points aload length 2 div 2 sub cvi /N ED N 0 ge { Dot -N { Dot } repeat Dot } { N 2 mul { pop } repeat } ifelse grestore -end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 50.0 0.0 90.0 20.0 80.0 0.0 60.0 20.0 50.0 10.0 - 1. 0.1 0. /c ED /b ED /a ED true AltCurve gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore gsave /DS 2.0 2. -CLW mul add 2 div def /PSTricksDotFont 0. [1.0 0.0 0.0 1.0 0.0 0.0] -FontDot /Dot { moveto gsave 1. 1. scale (b) show grestore } bind -def newpath Points aload length 2 div 2 sub cvi /N ED N 0 ge { Dot -N { Dot } repeat Dot } { N 2 mul { pop } repeat } ifelse grestore -end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray [ 120.0 0.0 150.0 20.0 -140.0 0.0 120.0 20.0 110.0 10.0 1. 0.1 0. /c ED /b ED /a ED true -ClosedCurve gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore gsave /DS 2.0 2. CLW mul add 2 div def /PSTricksDotFont -0. [1.0 0.0 0.0 1.0 0.0 0.0] FontDot /Dot { moveto gsave 1. 1. scale -(b) show grestore } bind def newpath Points aload length 2 div 2 sub -cvi /N ED N 0 ge { Dot N { Dot } repeat Dot } { N 2 mul { pop } repeat -} ifelse grestore end - -@endspecial 1 TeXcolorgray 0 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_dot.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_dot.eps deleted file mode 100644 index 4df6779c4c7..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_dot.eps +++ /dev/null @@ -1,1647 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_dot.dvi -%%CreationDate: Thu May 01 22:28:30 2008 -%%BoundingBox: 148 646 190 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_dot.dvi -o pst_dot.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_dot.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 333 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /DS 2.0 2. CLW mul -add 2 div def /PSTricksDotFont 0. [1.0 0.0 0.0 1.0 0.0 0.0] FontDot -/Dot { moveto gsave 1. 1. scale (b) show grestore } bind def 0.0 -0.0 Dot end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray [ 40.0 20.0 20.0 20.0 -0.0 20.0 false NArray /DS 2.0 2. CLW mul add 2 div def /PSTricksDotFont -0. [1.0 0.0 0.0 1.0 0.0 0.0] FontDot /Dot { moveto gsave 1. 1. scale -(b) show grestore } bind def newpath n { transform floor .5 add exch -floor .5 add exch itransform Dot } repeat end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_fill.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_fill.eps deleted file mode 100644 index 042963eba2b..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_fill.eps +++ /dev/null @@ -1,1661 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_fill.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 646 259 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_fill.dvi -o pst_fill.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_fill.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 914 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 10.0 10.0 10.0 .5 -CLW mul sub 0 360 arc closepath gsave 1 0 0 setrgbcolor 1. .setopacityalpha -fill grestore gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 40.0 10.0 10.0 .5 -CLW mul sub 0 360 arc closepath gsave 45. rotate 0.8 SLW 0 setgray -4.0 0.0 0.0 LineFill grestore gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 70.0 10.0 10.0 .5 -CLW mul sub 0 360 arc closepath gsave 90 rotate 45. rotate 0.8 SLW -0 setgray 4.0 0.0 0.0 LineFill grestore gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore end - -@endspecial @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 100.0 10.0 10.0 .5 -CLW mul sub 0 360 arc closepath gsave 45. rotate 0.8 SLW 0 setgray -4.0 0.0 0.0 LineFill grestore gsave 90 rotate 45. rotate 0.8 SLW 0 - setgray 4.0 0.0 0.0 LineFill grestore gsave 0.8 SLW 0 setgray 1. -.setopacityalpha 0 setlinecap stroke grestore end - -@endspecial -1 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray -eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_frame.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_frame.eps deleted file mode 100644 index 0b560e44727..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_frame.eps +++ /dev/null @@ -1,1644 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_frame.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 646 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_frame.dvi -o pst_frame.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_frame.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 748 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0. true 0.0 0.0 40.0 -20.0 .5 Frame gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0.3 true 50.0 0.0 90.0 -20.0 .5 Frame gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_grid.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_grid.eps deleted file mode 100644 index fe1316af047..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_grid.eps +++ /dev/null @@ -1,1649 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_grid.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 596 339 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_grid.dvi -o pst_grid.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_grid.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 1021 1578 582 v 1 TeXcolorgray -0 TeXcolorgray 805 855 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray gsave 0.4 SLW 0.5 - setgray -20.0 -20.0 60.0 40.0 0.0 0.0 20.0 abs 20.0 abs 5 0 {} 0 /Helvetica -findfont 0 scalefont setfont Grid grestore gsave 0.8 SLW 0 setgray --20.0 -20.0 60.0 40.0 0.0 0.0 20.0 abs 20.0 abs 1 0 { 0 setgray } -10.0 /Helvetica findfont 10.0 scalefont setfont Grid grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray gsave 0.4 SLW 0.5 - setgray 100.0 0.0 160.0 40.0 100.0 0.0 20.0 abs 20.0 abs 5 0 {} 0 -/Helvetica findfont 0 scalefont setfont Grid grestore gsave 0.8 SLW -0 setgray 100.0 0.0 160.0 40.0 100.0 0.0 20.0 abs 20.0 abs 1 0 { 0 - setgray } 10.0 /Helvetica findfont 10.0 scalefont setfont Grid grestore - end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_label.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_label.eps deleted file mode 100644 index 72b27c21a89..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_label.eps +++ /dev/null @@ -1,1752 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_label.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 142 628 199 670 -%%DocumentFonts: CMR10 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_label.dvi -o pst_label.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: texps.pro 0 0 -%! -TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 -index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll -exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics -exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub -dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} -ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict -end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ -dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 -roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def -dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} -if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} -def end - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -%%BeginFont: CMR10 -%!PS-AdobeFont-1.1: CMR10 1.00B -%%CreationDate: 1992 Feb 19 19:54:52 -% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. -11 dict begin -/FontInfo 7 dict dup begin -/version (1.00B) readonly def -/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def -/FullName (CMR10) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -end readonly def -/FontName /CMR10 def -/PaintType 0 def -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0] readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 65 /A put -dup 66 /B put -dup 67 /C put -readonly def -/FontBBox{-251 -250 1009 969}readonly def -currentdict end -currentfile eexec -D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 -016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 -9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F -D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 -469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 -2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 -87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F -D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 -92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C -295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75 -409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C -4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF -2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E -0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E -B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008 -24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B -43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF -D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575 -5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC -96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3 -7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3A3B198747B4DC992E -839A610506453BA7B2A56B2C552FDBE23916074DD54D39ED27A52D90D5D74B07 -A5265E72E3F2E0ACD9513E056F15E4BCBB9F409A6F39DEAE8D919C80EC13C56F -4864A6CCFF1ACFDA3D992F46D45571FC760DFF6EBFB011B6C123167CA96B77A0 -CFA8861BE3814E002E0A571E62C497886A135ACB53C0ACF7FECCEEF3FA4DC436 -9115AF71C9CA5E9E71CAAF5A17D5598D8E8BB772EF73E44F07BFCEA039DFB0F7 -E2C38F138EE0922FBDD3D7BA9CD9676102B0B9E22A4744EDBF299DB408B7B0B9 -B66DC8BDB8552BA01AEE38E1205B077C2F2C646747C748125F1CCF350E3930AD -AE5249B3D5CAE219454906C86EAB1DF73EEC1E8AFA68C7E230DAD77D9A072873 -B96E9DEF3EAEC6D5B9A045F9280D79AC9E0857AC916FC29DB487A669486DE827 -DFA3C487FBAEBCBBCB9558497A66CE72491373354376AEF7374AE1D709EC9A16 -4C369C237DD28FC4BE2843036E872B2A008D0DDEA0146E9E5F0EF49715BDCDAB -D4EFA0BD65C6822D70B0FBD115BE7EBCE816AB40D2ECDB17E15F2ADB75A84589 -BE79A66E6C29ACE5156971C30E226B3FC1A7CBFE350C693B23476C3C77F0D214 -06751D2DECCA6D14A899C877A1F71CF5F205C8FF35460B3792108C17A29A339F -99A0BE9FC33A702D808AAB91FD490E6E8C0D59356D2B2CD44371D02D3D040D8F -121CE31CCECE5DDAE9C44E87F9139DEB1AB6D393E6EADB7A3A33B4217523EC3F -FEC90D8B22E6CCBE26B11E71F55ED334888AC82AD91C436891DB5661343DFD20 -B6BD794BA985601ED4815E880DF113EDF1D48F7A7E82CB512AA62334D7354C64 -E7B988D9FB9F4898A1A6C3C225809E6C2EFBC4550A0CD2F4074889924F5978BF -BC4BC8D5C560FB448BC58D6183D4944ED038C4EDF065F94953319615BB532BEC -2F81D075393069E3205D061A6F5E6367922AEE12F7B0A0AFBEFB7B0C05C0959F -35807A7D15BD753FD79704123B28C14F22DE069DDD7455E31D6B17E167002EB8 -885B50A26D1B4869629219E63AFD2475C6C5E166F4AD97B59DE0BF534FC05192 -E90A68AC5D3A5E4CD38F484FB8326710D8B7237B2D6FB06F152E7F465A7415AE -AA5DA0967D8DB306AE3D6749892C91FE9FB692C0AD513198F4B9E2AC7F7CC177 -7567D890B960D070E8BE3DDDD724E0662367DA0AA3CC81D150C631B2D432CBC5 -F2D0191A687F3B8B01A1BCAEE46B7F6BC0D48E2DC86539524D7A1EA4849402CD -2FD3A232401465F44AA52CA4C2CD4CF06955E32A786894C1AE2C7358AC60C7B6 -D378C0EDAC363F0187BF819C940144AC477886830ECC8EBDDBC6C477616C5865 -D98BA4942511E5251D126C29BAC56DE4408C8314C79C85A299BCE712DD68D9D5 -EE10CD0AE1745996A7694350DFFAD7EF063A594D2A204B674B5E1118853CECE8 -5D4DAD30B8C8DC91D473F24153F513B758B0C92A1E5F04860604999D7E42EADB -A5BA39588B0BA0A2F13E34C6229D7C6F0110C4015B21E618C386E9D8DFEB2FCE -5D9C69D7D7C1DB6F776B3052C80C9175A4A8CBA9192C82C0520D5B06B7D1978C -1CA45CE52A081D47A53C4CB8C9101D6661CBD6B57700BEE502BBFB45647C275B -F0D9BCBF311C06F6D263B0F7D0CD123C265E86D1C0B40026C184D8051BE9A277 -D3AE586439E71CCD5A2EB0DE72003E9B28485A -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -%%EndFont -TeXDict begin 40258437 52099154 1000 600 600 (pst_label.dvi) -@start /Fa 188[60 59 62 65[{}3 83.022 /CMR10 rf end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 747 391 308 v 1 TeXcolorgray -0 TeXcolorgray 656 731 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray [ 20.0 30.0 40.0 0.0 -0.0 0.0 /Lineto /lineto load def false 0 setlinejoin Polygon gsave -0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap stroke grestore -end - -@endspecial -594 759 a Fa(A)332 b(B)792 482 y(C)p 1 TeXcolorgray 0 -TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_line.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_line.eps deleted file mode 100644 index 5d04ec6ecca..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_line.eps +++ /dev/null @@ -1,1646 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_line.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 646 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_line.dvi -o pst_line.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_line.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 748 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 40.0 0.0 20.0 20.0 0.0 0.0 /Lineto /lineto -load def false 0 setlinejoin Line gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 90.0 0.0 70.0 20.0 50.0 0.0 /r 3.00003 def -/Lineto { Arcto } def false 0 setlinejoin Line gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_linestyle.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_linestyle.eps deleted file mode 100644 index 4d2597ccf33..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_linestyle.eps +++ /dev/null @@ -1,1653 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_linestyle.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 626 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_linestyle.dvi -o pst_linestyle.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_linestyle.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 772 748 333 v 1 TeXcolorgray -0 TeXcolorgray 639 772 a @beginspecial @setspecial - tx@Dict begin STP newpath 1.5 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 90.0 40.0 0.0 40.0 /Lineto /lineto load def -false 0 setlinejoin Line gsave 1.5 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 90.0 20.0 0.0 20.0 /Lineto /lineto load def -false 0 setlinejoin Line gsave 0.8 SLW 0 setgray 1. .setopacityalpha -3.0 0 0 add DotLine grestore end - -@endspecial @beginspecial -@setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def [ 90.0 0.0 0.0 0.0 /Lineto /lineto load def false -0 setlinejoin Line gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 - setlinecap 5.0 3.0 0.0 0.0 0 0 add DashLine grestore end - -@endspecial 1 TeXcolorgray 0 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_origin.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_origin.eps deleted file mode 100644 index 24b3fe5608c..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_origin.eps +++ /dev/null @@ -1,1644 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_origin.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 646 219 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_origin.dvi -o pst_origin.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_origin.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 582 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0. true 0.0 0.0 30.0 -20.0 .5 Frame gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 40.0 0.0 T 0.8 SLW 0 setgray 0. true -0.0 0.0 30.0 20.0 .5 Frame gsave 0.8 SLW 0 setgray 1. .setopacityalpha -0 setlinecap stroke grestore end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_parabola.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_parabola.eps deleted file mode 100644 index 7b7f621f367..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_parabola.eps +++ /dev/null @@ -1,1644 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_parabola.dvi -%%CreationDate: Thu May 01 22:28:31 2008 -%%BoundingBox: 148 646 170 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_parabola.dvi -o pst_parabola.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_parabola.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 167 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray /ArrowA { moveto } -def /ArrowB { } def 20.0 20.0 10.0 0.0 Parab gsave 0.8 SLW 0 setgray -1. .setopacityalpha 0 setlinecap stroke grestore gsave /DS 2.0 2. -CLW mul add 2 div def /PSTricksDotFont 0. [1.0 0.0 0.0 1.0 0.0 0.0] -FontDot /Dot { moveto gsave 1. 1. scale (b) show grestore } bind -def newpath Points aload length 2 div 2 sub cvi /N ED N 0 ge { Dot -N { Dot } repeat Dot } { N 2 mul { pop } repeat } ifelse grestore -end - -@endspecial -1 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray -eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_polygon.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_polygon.eps deleted file mode 100644 index 59207fffb36..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_polygon.eps +++ /dev/null @@ -1,1646 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_polygon.dvi -%%CreationDate: Thu May 01 22:28:32 2008 -%%BoundingBox: 148 646 239 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_polygon.dvi -o pst_polygon.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_polygon.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 606 748 167 v 1 TeXcolorgray -0 TeXcolorgray 639 606 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray [ 40.0 0.0 20.0 20.0 -0.0 0.0 /Lineto /lineto load def false 0 setlinejoin Polygon gsave -0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap stroke grestore -end - -@endspecial -@beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray [ 90.0 0.0 70.0 20.0 -50.0 0.0 /r 3.00003 def /Lineto { Arcto } def false 0 setlinejoin -Polygon gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial 1 TeXcolorgray -0 TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_rput.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_rput.eps deleted file mode 100644 index 2d2a1109d5c..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_rput.eps +++ /dev/null @@ -1,1649 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_rput.dvi -%%CreationDate: Thu May 01 22:28:32 2008 -%%BoundingBox: 148 634 229 668 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_rput.dvi -o pst_rput.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 600 600 (pst_rput.dvi) -@start end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 706 665 266 v 1 TeXcolorgray -0 TeXcolorgray 639 706 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0. true 0.0 0.0 30.0 -20.0 .5 Frame gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial -1054 706 a - tx@Dict begin 30. RotBegin end - 1054 706 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray 0. true 0.0 0.0 30.0 -20.0 .5 Frame gsave 0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap -stroke grestore end - -@endspecial -1054 706 a - tx@Dict begin RotEnd end - 1054 706 a 1 TeXcolorgray 0 TeXcolorgray 0 -TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_uput.eps b/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_uput.eps deleted file mode 100644 index fe154a8174a..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/pst_uput.eps +++ /dev/null @@ -1,1752 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvips(k) 5.96dev Copyright 2007 Radical Eye Software -%%Title: pst_uput.dvi -%%CreationDate: Thu May 01 22:28:32 2008 -%%BoundingBox: 137 627 204 674 -%%DocumentFonts: CMR10 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -E pst_uput.dvi -o pst_uput.eps -%DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2008.05.01:2228 -%%BeginProcSet: tex.pro 0 0 -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S -/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy -setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask -restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/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{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -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} -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{ -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 -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: pstricks.pro 0 0 -% $Id: pstricks.pro 10 2008-01-18 13:31:24Z herbert $ -% -% PostScript prologue for pstricks.tex. -% Version 1.03, 2008/01/01 -% For distribution and copyright, see pstricks.tex. -% -% -systemdict /.setopacityalpha known not {/.setopacityalpha { pop } def } if -systemdict /.setblendmode known not {/.setblendmode { pop } def } if -systemdict /.setshapealpha known not {/.setshapealpha { pop } def } if -% -/tx@Dict 200 dict def tx@Dict begin -/ADict 25 dict def -/CM { matrix currentmatrix } bind def -/SLW /setlinewidth load def -/CLW /currentlinewidth load def -/CP /currentpoint load def -/ED { exch def } bind def -/L /lineto load def -/T /translate load def -/TMatrix { } def -/RAngle { 0 } def -/Sqrt { dup 0 lt { pop 0 } { sqrt } ifelse } def % return 0 for negative arguments -/Atan { /atan load stopped { pop pop 0 } if } def % return 0 if atan not known -/ATAN1 {neg -1 atan 180 sub } def % atan(x) (only one parameter) -/Div { dup 0 eq { pop } { div } ifelse } def % control the division -/tan { dup cos abs 1.e-10 lt - { pop 1.e10 } % return 1.e10 as infinit - { dup sin exch cos div } ifelse % default sin/cos -} def -/Tan { dup sin exch cos Div } def % sin(x)/cos(x) x in degrees -/Acos {dup dup mul neg 1 add dup 0 lt { % arc cos, returns 0 when negative root - pop pop 0 }{ sqrt exch atan} ifelse } def -/NET { neg exch neg exch T } def % change coordinate system to the negative one -/Pyth { dup mul exch dup mul add sqrt } def % Pythagoras, expects 2 parameter -/Pyth2 { % Pythagoras, xA yA xB yB - 3 -1 roll % xA xB yB yA - sub % xA xB yB-yA - 3 1 roll % yB-yA xA xB - sub % yB-yA xA-xB - Pyth } def -/PtoC { 2 copy cos mul 3 1 roll sin mul } def % Polar to Cartesian -%----------------- hv added 20050516 --------------- -/PiDiv2 1.57079632680 def -/Pi 3.14159265359 def -/TwoPi 6.28318530718 def -/Euler 2.71828182846 def -%/e Euler bind def -/RadtoDeg { 180 mul Pi div } bind def % convert from radian to degrees -/DegtoRad { Pi mul 180 div } bind def % viceversa -%----------------- hv end--------------------------- -/PathLength@ { /z z y y1 sub x x1 sub Pyth add def /y1 y def /x1 x def } def -/PathLength { flattenpath /z 0 def - { /y1 ED /x1 ED /y2 y1 def /x2 x1 def - }{ /y ED /x ED PathLength@ } {} { /y y2 def /x x2 def PathLength@ } - /pathforall load stopped { pop pop pop pop } if z } def -/STP { .996264 dup scale } def -/STV { SDict begin normalscale end STP } def -% -%%-------------- DG begin patch 15 ---------------%% -%/DashLine { dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def -%PathLength } ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y -%mul sub z Div round z mul a .5 sub 2 mul y mul add b exch Div dup y mul -%/y ED x mul /x ED x 0 gt y 0 gt and { [ y x ] 1 a sub y mul } { [ 1 0 ] -%0 } ifelse setdash stroke } def -/DashLine { - dup 0 gt { /a .5 def PathLength exch div } { pop /a 1 def PathLength } ifelse - /b ED /x1 ED /y1 ED /x ED /y ED - /z y x add y1 add x1 add def - /Coef b a .5 sub 2 mul y mul sub z Div round - z mul a .5 sub 2 mul y mul add b exch Div def - /y y Coef mul def - /x x Coef mul def - /y1 y1 Coef mul def - /x1 x1 Coef mul def - x1 0 gt y1 0 gt or x 0 gt or y 0 gt and - { [ y x y1 x1 ] 1 a sub y mul } - { [ 1 0 ] 0 } ifelse - setdash stroke -} def -%%-------------- DG end patch 15 ---------------%% -/DotLine { - /b PathLength def - /a ED /z ED /y CLW def - /z y z add def - a 0 gt { - /b b a div def - }{ - a 0 eq { - /b b y sub def - }{ a -3 eq { - /b b y add def } if - } ifelse - } ifelse - [ 0 b b z Div round Div dup 0 le { pop 1 } if ] - a 0 gt { 0 }{ y 2 div a -2 gt { neg }if } ifelse - setdash 1 setlinecap stroke -} def -% -/LineFill { % hv ------------ patch 7 ------------- - gsave - abs /hatchWidthInc ED - abs /hatchSepInc ED - abs CLW add /a ED - a 0 dtransform round exch round exch - 2 copy idtransform - exch Atan rotate - idtransform pop /a ED - .25 .25 itransform pathbbox - /y2 ED - a Div ceiling cvi /x2 ED /y1 ED - a Div cvi /x1 ED /y2 y2 y1 sub def - clip - newpath - 2 setlinecap - systemdict - /setstrokeadjust known { true setstrokeadjust } if - x2 x1 sub 1 add { - x1 a mul y1 moveto 0 y2 rlineto stroke - /x1 x1 1 add - hatchWidthInc 0 gt { CLW add } if - def - hatchSepInc 0 gt hatchWidthInc 0 gt or { - /a a hatchSepInc add def - CLW hatchWidthInc add SLW - } if - } repeat - grestore - pop pop } def -% -%gsave abs CLW add /a ED a 0 dtransform round exch round exch -%2 copy idtransform exch Atan rotate idtransform pop /a ED .25 .25 -%% DG/SR modification begin - Dec. 12, 1997 - Patch 2 -%%itransform translate pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%itransform pathbbox /y2 ED a Div ceiling cvi /x2 ED /y1 ED a -%% DG/SR modification end -%Div cvi /x1 ED /y2 y2 y1 sub def clip newpath 2 setlinecap systemdict -%/setstrokeadjust known { true setstrokeadjust } if x2 x1 sub 1 add { x1 -%% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -%% a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore } -%% def -%a mul y1 moveto 0 y2 rlineto stroke /x1 x1 1 add def } repeat grestore -%pop pop } def -%% DG/SR modification end -% -/BeginArrow { ADict begin - /@mtrx CM def - gsave - 2 copy T - 2 index sub neg exch - 3 index sub exch Atan - rotate newpath -} def -% -/EndArrow { @mtrx setmatrix CP grestore end } def -% -/Arrow { - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /a ED - { 0 h T 1 -1 scale } if - w neg h moveto - 0 0 L w h L w neg a neg rlineto - gsave fill grestore -} def -% -/ArrowD { % the sides are drawn as curves (hv 20071211) - CLW mul add dup - 2 div /w ED - mul dup /h ED - mul /Inset ED - { 0 h T 1 -1 scale } if % changes the direction -% we use y=w/h^2 * x^2 as equation for the control points -% for the coordinates the arrow is seen from top to bottom -% the bottom (tip) is (0;0) - w neg h moveto % lower left of > - w 9 div 4 mul neg h 3 div 2 mul - w 9 div neg h 3 div - 0 0 curveto % tip of > - w 9 div h 3 div - w 9 div 4 mul h 3 div 2 mul - w h curveto % upper left of > - w neg Inset neg rlineto % move to x=0 and inset - gsave fill grestore -} def -% -/Tbar { - CLW mul add /z ED - z -2 div CLW 2 div moveto - z 0 rlineto stroke - 0 CLW moveto -} def -% -/Bracket { - CLW mul add dup CLW sub 2 div - /x ED mul CLW add /y ED /z CLW 2 div def - x neg y moveto - x neg CLW 2 div L x CLW 2 div L x y L stroke - 0 CLW moveto -} def -% -/RoundBracket { - CLW mul add dup 2 div - /x ED mul /y ED /mtrx CM def - 0 CLW 2 div T x y mul 0 ne { x y scale } if - 1 1 moveto - .85 .5 .35 0 0 0 curveto - -.35 0 -.85 .5 -1 1 curveto - mtrx setmatrix stroke 0 CLW moveto -} def -% -/SD { 0 360 arc fill } def -% -/EndDot { % DS is the dot size - { /z DS def } { /z 0 def } ifelse - /b ED 0 z DS SD b { 0 z DS CLW sub SD } if - 0 DS z add CLW 4 div sub moveto } def -% -/Shadow { [ { /moveto load } { /lineto load } { /curveto load } { - /closepath load } /pathforall load stopped { pop pop pop pop CP /moveto - load } if ] cvx newpath 3 1 roll T exec } def -% -%/NArray { -% aload length 2 div dup dup cvi eq not { exch pop } if /n exch -% cvi def -%} def -% -/NArray { % holds the coordinates and on top of stack the showpoints boolean - /showpoints ED - counttomark 2 div dup cvi /n ED - n eq not { exch pop } if - showpoints { ] aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse -} def -/Line { - NArray n 0 eq not - { n 1 eq { 0 0 /n 2 def } if ArrowA /n n 2 sub def - n { Lineto } repeat - CP 4 2 roll ArrowB L pop pop - } if -} def -/Arcto { /a [ 6 -2 roll ] cvx def a r /arcto load stopped { 5 } { 4 } - ifelse { pop } repeat a } def -/CheckClosed { dup n 2 mul 1 sub index eq 2 index n 2 mul 1 add index eq - and { pop pop /n n 1 sub def } if } def -/Polygon { NArray n 2 eq { 0 0 /n 3 def } if n 3 lt { n { pop pop } - repeat } { n 3 gt { CheckClosed } if n 2 mul -2 roll /y0 ED /x0 ED /y1 - ED /x1 ED x1 y1 /x1 x0 x1 add 2 div def /y1 y0 y1 add 2 div def x1 y1 - moveto /n n 2 sub def n { Lineto } repeat x1 y1 x0 y0 6 4 roll Lineto - Lineto pop pop closepath } ifelse } def -/Diamond { - /mtrx CM def - T rotate - /h ED - /w ED - dup 0 eq { pop } { CLW mul neg - /d ED - /a w h Atan def - /h d a sin Div h add def - /w d a cos Div w add def } ifelse - mark w 2 div h 2 div w 0 0 h neg w neg 0 0 h w 2 div h 2 div - /ArrowA { moveto } def - /ArrowB { } def - false Line - closepath mtrx setmatrix } def -% DG modification begin - Jan. 15, 1997 -%/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup 0 eq { -%pop } { CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -%div dup cos exch sin Div mul sub def } ifelse mark 0 d w neg d 0 h w d 0 -%d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -%setmatrix } def -/Triangle { /mtrx CM def translate rotate /h ED 2 div /w ED dup -CLW mul /d ED /h h d w h Atan sin Div sub def /w w d h w Atan 2 -div dup cos exch sin Div mul sub def mark 0 d w neg d 0 h w d 0 -d /ArrowA { moveto } def /ArrowB { } def false Line closepath mtrx -% DG/SR modification begin - Jun. 1, 1998 - Patch 3 (from Michael Vulis) -% setmatrix } def -setmatrix pop } def -% DG/SR modification end -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CCA { /y ED /x ED 2 copy y sub /dy1 ED x sub /dx1 ED /l1 dx1 dy1 Pyth -def } def -/CC { /l0 l1 def /x1 x dx sub def /y1 y dy sub def /dx0 dx1 def /dy0 dy1 -def CCA /dx dx0 l1 c exp mul dx1 l0 c exp mul add def /dy dy0 l1 c exp -mul dy1 l0 c exp mul add def /m dx0 dy0 Atan dx1 dy1 Atan sub 2 div cos -abs b exp a mul dx dy Pyth Div 2 div def /x2 x l0 dx mul m mul sub def -/y2 y l0 dy mul m mul sub def /dx l1 dx mul m mul neg def /dy l1 dy mul -m mul neg def } def -/IC { /c c 1 add def c 0 lt { /c 0 def } { c 3 gt { /c 3 def } if } -ifelse /a a 2 mul 3 div 45 cos b exp div def CCA /dx 0 def /dy 0 def } -def -/BOC { IC CC x2 y2 x1 y1 ArrowA CP 4 2 roll x y curveto } def -/NC { CC x1 y1 x2 y2 x y curveto } def -/EOC { x dx sub y dy sub 4 2 roll ArrowB 2 copy curveto } def -/BAC { IC CC x y moveto CC x1 y1 CP ArrowA } def -/NAC { x2 y2 x y curveto CC x1 y1 } def -/EAC { x2 y2 x y ArrowB curveto pop pop } def -/OpenCurve { - NArray n 3 lt - { n { pop pop } repeat } - { BOC /n n 3 sub def n { NC } repeat EOC } ifelse -} def -/AltCurve { { false NArray n 2 mul 2 roll [ n 2 mul 3 sub 1 roll ] aload -/Points ED n 2 mul -2 roll } { false NArray } ifelse n 4 lt { n { pop -pop } repeat } { BAC /n n 4 sub def n { NAC } repeat EAC } ifelse } def -/ClosedCurve { NArray n 3 lt { n { pop pop } repeat } { n 3 gt { -CheckClosed } if 6 copy n 2 mul 6 add 6 roll IC CC x y moveto n { NC } -repeat closepath pop pop } ifelse } def -/SQ { /r ED r r moveto r r neg L r neg r neg L r neg r L fill } def -/ST { /y ED /x ED x y moveto x neg y L 0 x L fill } def -/SP { /r ED gsave 0 r moveto 4 { 72 rotate 0 r L } repeat fill grestore } -def -/FontDot { DS 2 mul dup matrix scale matrix concatmatrix exch matrix -rotate matrix concatmatrix exch findfont exch makefont setfont } def -/Rect { x1 y1 y2 add 2 div moveto x1 y2 lineto x2 y2 lineto x2 y1 lineto -x1 y1 lineto closepath } def -/OvalFrame { x1 x2 eq y1 y2 eq or { pop pop x1 y1 moveto x2 y2 L } { y1 -y2 sub abs x1 x2 sub abs 2 copy gt { exch pop } { pop } ifelse 2 div -exch { dup 3 1 roll mul exch } if 2 copy lt { pop } { exch pop } ifelse -/b ED x1 y1 y2 add 2 div moveto x1 y2 x2 y2 b arcto x2 y2 x2 y1 b arcto -x2 y1 x1 y1 b arcto x1 y1 x1 y2 b arcto 16 { pop } repeat closepath } -ifelse } def -/Frame { CLW mul /a ED 3 -1 roll 2 copy gt { exch } if a sub /y2 ED a add -/y1 ED 2 copy gt { exch } if a sub /x2 ED a add /x1 ED 1 index 0 eq { -pop pop Rect } { OvalFrame } ifelse } def -/BezierNArray { /f ED counttomark 2 div dup cvi /n ED n eq not { exch pop -} if n 1 sub neg 3 mod 3 add 3 mod { 0 0 /n n 1 add def } repeat f { ] -aload /Points ED } { n 2 mul 1 add -1 roll pop } ifelse } def -/OpenBezier { BezierNArray n 1 eq { pop pop } { ArrowA n 4 sub 3 idiv { 6 -2 roll 4 2 roll curveto } repeat 6 2 roll 4 2 roll ArrowB curveto } -ifelse } def -/ClosedBezier { BezierNArray n 1 eq { pop pop } { moveto n 1 sub 3 idiv { -6 2 roll 4 2 roll curveto } repeat closepath } ifelse } def -/BezierShowPoints { gsave Points aload length 2 div cvi /n ED moveto n 1 -sub { lineto } repeat CLW 2 div SLW [ 4 4 ] 0 setdash stroke grestore } -def -/Parab { /y0 exch def /x0 exch def /y1 exch def /x1 exch def /dx x0 x1 -sub 3 div def /dy y0 y1 sub 3 div def x0 dx sub y0 dy add x1 y1 ArrowA -x0 dx add y0 dy add x0 2 mul x1 sub y1 ArrowB curveto /Points [ x1 y1 x0 -y0 x0 2 mul x1 sub y1 ] def } def -% -/Grid { - newpath - /a 4 string def - /b ED /c ED /n ED - cvi dup 1 lt { pop 1 } if - /s ED - s div dup 0 eq { pop 1 } if - /dy ED s div dup 0 eq { pop 1 } if - /dx ED dy div round dy mul - /y0 ED dx div round dx mul - /x0 ED dy div round cvi - /y2 ED dx div round cvi - /x2 ED dy div round cvi - /y1 ED dx div round cvi - /x1 ED - /h y2 y1 sub 0 gt { 1 } { -1 } ifelse def - /w x2 x1 sub 0 gt { 1 } { -1 } ifelse def - b 0 gt { - /z1 b 4 div CLW 2 div add def -% /Helvetica findfont b scalefont setfont - /b b .95 mul CLW 2 div add def } if - systemdict /setstrokeadjust known - { true setstrokeadjust /t { } def } - { /t { transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add - exch itransform } bind def } ifelse - gsave n 0 gt { 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash } { 2 setlinecap } ifelse - /i x1 def - /f y1 dy mul n 0 gt { dy n div 2 div h mul sub } if def - /g y2 dy mul n 0 gt { dy n div 2 div h mul add } if def - x2 x1 sub w mul 1 add dup 1000 gt { pop 1000 } if - { i dx mul dup y0 moveto - b 0 gt - { gsave c i a cvs dup stringwidth pop - /z2 ED w 0 gt {z1} {z1 z2 add neg} ifelse - h 0 gt {b neg}{z1} ifelse - rmoveto show grestore } if - dup t f moveto - g t L stroke - /i i w add def - } repeat - grestore - gsave - n 0 gt - % DG/SR modification begin - Nov. 7, 1997 - Patch 1 - %{ 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash } - { 1 setlinecap [ 0 dx n div ] dx n div 2 div setdash } - % DG/SR modification end - { 2 setlinecap } ifelse - /i y1 def - /f x1 dx mul n 0 gt { dx n div 2 div w mul sub } if def - /g x2 dx mul n 0 gt { dx n div 2 div w mul add } if def - y2 y1 sub h mul 1 add dup 1000 gt { pop 1000 } if - { newpath i dy mul dup x0 exch moveto - b 0 gt { gsave c i a cvs dup stringwidth pop - /z2 ED - w 0 gt {z1 z2 add neg} {z1} ifelse - h 0 gt {z1} {b neg} ifelse - rmoveto show grestore } if - dup f exch t moveto - g exch t L stroke - /i i h add def - } repeat - grestore -} def -% -/ArcArrow { - /d ED /b ED /a ED - gsave - newpath 0 -1000 moveto clip - newpath - 0 1 0 0 b - grestore - c mul - /e ED - pop pop pop r a e d PtoC y add exch x add - exch r a PtoC y add exch x add exch b pop pop pop pop a e d CLW 8 div c - mul neg d -} def -% -/Ellipse { /mtrx CM def T scale 0 0 1 5 3 roll arc mtrx setmatrix } def -% -/ArcAdjust { %%%% Vincent Guirardel -% given a target length (targetLength) and an initial angle (angle0) [in the stack], -% let M(angle0)=(rx*cos(angle0),ry*sin(angle0))=(x0,y0). -% This computes an angle t such that (x0,y0) is at distance -% targetLength from the point M(t)=(rx*cos(t),ry*sin(t)). -% NOTE: this an absolute angle, it does not have to be added or substracted to angle0 -% contrary to TvZ's code. -% To achieve, this, one iterates the following process: start with some angle t, -% compute the point M' at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]. -% Now take t' (= new angle) so that (0,0) M(t') and M' are aligned. -% -% Another difference with TvZ's code is that we need d (=add/sub) to be defined. -% the value of d = add/sub is used to know on which side we have to move. -% It is only used in the initialisation of the angle before the iteration. -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Input stack: 1: target length 2: initial angle -% variables used : rx, ry, d (=add/sub) -% - /targetLength ED /angle0 ED - /x0 rx angle0 cos mul def - /y0 ry angle0 sin mul def -% we are looking for an angle t such that (x0,y0) is at distance targetLength -% from the point M(t)=(rx*cos(t),ry*sin(t))) -%initialisation of angle (using 1st order approx = TvZ's code) - targetLength 57.2958 mul - angle0 sin rx mul dup mul - angle0 cos ry mul dup mul - add sqrt div -% if initialisation angle is two large (more than 90 degrees) set it to 90 degrees -% (if the ellipse is very curved at the point where we draw the arrow, % -% the value can be much more than 360 degrees !) -% this should avoid going on the wrong side (more than 180 degrees) or go near -% a bad attractive point (at 180 degrees) - dup 90 ge { pop 90 } if - angle0 exch d % add or sub -% maximum number of times to iterate the iterative procedure: -% iterative procedure: takes an angle t on top of stack, computes a -% better angle (and put it on top of stack) - 30 { dup -% compute distance D between (x0,y0) and M(t) - dup cos rx mul x0 sub dup mul exch sin ry mul y0 sub dup mul add sqrt -% if D almost equals targetLength, we stop - dup targetLength sub abs 1e-5 le { pop exit } if -% stack now contains D t -% compute the point M(t') at distance targetLength of (x0,y0) on the semi-line [(x0,y0) M(t)]: -% M(t')= ( (x(t)-x0)*targetLength/d+x0 , (y(t)-y0)*targetLength/d+y0 ) - exch dup cos rx mul x0 sub exch sin ry mul y0 sub -% stack contains: y(t)-y0, x(t)-x0, d - 2 index Div targetLength mul y0 add ry Div exch - 2 index Div targetLength mul x0 add rx Div -% stack contains x(t')/rx , y(t')/ry , d -% now compute t', and remove D from stack - atan exch pop - } repeat -% we don't look at what happened... in particular, if targetLength is greater -% than the diameter of the ellipse... -% the final angle will be around /angle0 + 180. maybe we should treat this pathological case... -% after iteration, stack contains an angle t such that M(t) is the tail of the arrow -% to give back the result as a an angle relative to angle0 we could add the following line: -% angle0 sub 0 exch d -% -% begin bug fix 2006-01-11 -% we want to adjust the new angle t' by a multiple of 360 so that | t'-angle0 | <= 180 -%(we don't want to make the ellipse turn more or less than it should)... -dup angle0 sub dup abs 180 gt { 180 add 360 div floor 360 mul sub } { pop } ifelse -% end bug fix -} def -% -/EllipticArcArrow { - /d ED % is add or sub - /b ED % arrow procedure - /a1 ED % angle - gsave - newpath - 0 -1000 moveto - clip % Set clippath far from arrow. - newpath - 0 1 0 0 b % Draw arrow to determine length. - grestore -% Length of arrow is on top of stack. Next 3 numbers are junk. -% - a1 exch ArcAdjust % Angular position of base of arrow. - /a2 ED - pop pop pop - a2 cos rx mul xOrig add % hv 2007-08-29 x->xOrig - a2 sin ry mul yOrig add % hv 2007-08-29 y->yOrig - a1 cos rx mul xOrig add % - a1 sin ry mul yOrig add % -% Now arrow tip coor and base coor are on stack. - b pop pop pop pop % Draw arrow, and discard coordinates. - a2 CLW 8 div -% change value of d (test it by looking if `` 1 1 d '' gives 2 or not ) - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse - ArcAdjust -% resets original value of d - 1 1 d 2 eq { /d { sub } def } { /d { add } def } ifelse % Adjust angle to give overlap. -} def -%%------------------ tvz/DG/hv (2004-05-10) end -------------------%% -% -/Rot { CP CP translate 3 -1 roll neg rotate NET } def -% -/RotBegin { - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def - /a ED - a Rot /RAngle [ RAngle dup a add ] cvx def -} def -% -/RotEnd { /TMatrix [ TMatrix setmatrix ] cvx def /RAngle [ RAngle pop ] cvx def } def -% -/PutCoor { gsave CP T CM STV exch exec moveto setmatrix CP grestore } def -/PutBegin { /TMatrix [ TMatrix CM ] cvx def CP 4 2 roll T moveto } def -/PutEnd { CP /TMatrix [ TMatrix setmatrix ] cvx def moveto } def -/Uput { /a ED add 2 div /h ED 2 div /w ED /s a sin def /c a cos def /b s -abs c abs 2 copy gt dup /q ED { pop } { exch pop } ifelse def /w1 c b -div w mul def /h1 s b div h mul def q { w1 abs w sub dup c mul abs } { -h1 abs h sub dup s mul abs } ifelse } def -/UUput { /z ED abs /y ED /x ED q { x s div c mul abs y gt } { x c div s -mul abs y gt } ifelse { x x mul y y mul sub z z mul add sqrt z add } { q -{ x s div } { x c div } ifelse abs } ifelse a PtoC h1 add exch w1 add -exch } def -/BeginOL { dup (all) eq exch TheOL eq or { IfVisible not { Visible -/IfVisible true def } if } { IfVisible { Invisible /IfVisible false def -} if } ifelse } def -/InitOL { /OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def -/Visible { CP OLUnit idtransform T moveto } def /Invisible { CP OLUnit -neg exch neg exch idtransform T moveto } def /BOL { BeginOL } def -/IfVisible true def } def -end -%-----------------------------------------------------------------------------% - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-algparser.pro 0 0 -% $Id: pst-algparser.pro 7 2007-12-29 22:21:13Z herbert $ -% -% PostScript prologue for PSTricks algorithm parser -% Version 0.01, 2008/01/01 -% For distribution and copyright, see pstricks.tex. hv@pstricks.de -% -%-----------------------------------------------------------------------------% -/AlgParser { tx@AlgToPs begin AlgToPs end } def % Dominique Rodriguez -% -/tx@CoreAnalyzerDict 100 dict def tx@CoreAnalyzerDict begin -% -% PS ANALYZER FOR ALGEBRAIC EXPRESSION V1.12 -% E->T|E+T -% T->FS|T*FS -% FS -> F | +FS | -FS -% F->P|F^SF -% P->(E)|literal -% literal->number|var|var[E]|func(params) -% params->E|E,param -% number->TOBEFINISHED -% -%% E expression, T term, SF signed factor, F factor, P power -% -%% parser -% -%% str -% -%% C->E<condition_operators>E -%% STR index -> STR index+lenExpr -/AnalyzeCond { AnalyzeExpr ReadCondOp AnalyzeExpr EvalCondOp } def -% -%% analyze Expression List (separator , or | ) -%% STR index -> STR index+lenExpr -%% /AnalyzeListOfE { -%% { NextNonBlankChar pop AnalyzeExpr%%dup Strlen eq { exit } if NextNonBlankChar -%% NextNonBlankChar dup 0 eq { pop exit } if -%% dup 44 ne 1 index 124 ne and { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } if -%% pop NextNonBlankChar dup 0 eq { exit } if 124 ne { PROBLEMCONTACTBILLOU } if 1 add NextNonBlankChar 0 eq {toto} if } loop -%% AnalyzeListOfEPostHook -%% } def -/AnalyzeListOfE { - /NotFirst false def - { NextNonBlankChar pop AnalyzeExpr - NotFirst { EvalListOfExpr } { /NotFirst true def } ifelse - dup Strlen eq { exit } if NextNonBlankChar - dup 44 ne 1 index 124 ne and - { dup 41 ne { PROBLEMCONTACTBILLOU } { pop exit } ifelse } - if pop 1 add } loop - AnalyzeListOfEPostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% E->T|E+T -%% STR index -> STR index+lenExpr -/AnalyzeExpr { - AnalyzePreHook AnalyzeTerm IsEndingExpr - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeTerm PreEvalHook EvalAddSub IsEndingExpr { pop exit } if } loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% T->FS|T*FS -%% STR index -/AnalyzeTerm { - AnalyzePreHook AnalyzeSignedFactor IsEndingTerm - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor PreEvalHook EvalMulDiv IsEndingTerm { pop exit } if} loop } - ifelse - AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% FS -> F | +FS | -FS -%% STR index -/AnalyzeSignedFactor { - AnalyzePreHook 2 copy get dup IsUnaryOp - { RollOp 1 add NextNonBlankChar pop AnalyzeSignedFactor EvalUnaryOp } - { pop AnalyzeFactor } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% F->P|F^P -%% STR index -/AnalyzeFactor { - AnalyzePreHook AnalyzePower IsEndingFactor - { dup 0 ne { 32 eq { NextNonBlankChar } if } { pop } ifelse } - { { RollOp 1 add NextNonBlankChar pop AnalyzePower PreEvalHook EvalPower IsEndingFactor { pop exit } if} loop } - ifelse AnalyzePostHook -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% P->(E)|literal -%% STR index -/AnalyzePower { - %% depending of first char either a number, or a literal - 2 copy get dup 40 eq%%an open par - { pop 1 add NextNonBlankChar pop AnalyzeExpr 1 add NextNonBlankChar pop } - { AnalyzeLiteral } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index STR[index] -> STR index -%/AnalyzeLiteral { IsNumber { EvalNumber } { EvalLiteral } ifelse } def -/AnalyzeLiteral { dup IsUnaryOp exch IsNumber or { EvalNumber } { EvalLiteral } ifelse } def%%dr 09102006 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% recognize + or - -%% chr -> T/F -/IsUnaryOp { dup 43 eq exch 45 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsNumber { dup 48 ge exch dup 57 le 3 -1 roll and exch 46 eq or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadNumber { - exch dup 3 -1 roll dup 3 1 roll - %%read mantissa - { 1 add 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsNumber not { exit } if pop } loop - dup 101 eq exch 69 eq or - %%% there is a "e" or "E" -> read exponant - { 1 add 2 copy get dup IsUnaryOp - { pop 1 add 2 copy get } if - { IsNumber not { exit } if 1 add 2 copy get } loop } - if - dup 4 1 roll - 3 -1 roll exch 1 index sub getinterval -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a number can contain only : 0123456789. -%% chr -> T/F -/IsCondOp { dup 30 eq exch dup 60 ge exch 62 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index number -%% a number can be of the form [0-9]*.[0-9]*\([eE][+-]?[0-9]+\)? -%% STR index -> STR index' number -/ReadCondOp { - NextNonBlankChar 1 index 4 1 roll - { IsCondOp not { exit } if 1 add 2 copy get } loop - 2 copy 5 -1 roll - exch 1 index sub getinterval 3 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can contain only : 0123456789. -%% chr -> T/F -/IsLiteral {% - dup 48 ge exch dup 57 le 3 -1 roll and exch - dup 65 ge exch dup 90 le 3 -1 roll and 3 -1 roll or exch - dup 97 ge exch 122 le and or } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% a literal can be of the form [a-zA-Z][a-zA-Z0-9]*\(\((Expression)\)|\(\[Expression\]\)\)? -%% STR index -> literal STR index' nextchr -/ReadLiteral { - exch dup 3 -1 roll dup 3 1 roll - %%read literal core - { 2 copy dup Strlen eq { pop pop 0 exit } if get dup IsLiteral not { exit } if pop 1 add } loop - 4 1 roll dup 5 1 roll 3 -1 roll exch 1 index sub getinterval 4 1 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a clpar -%% STR index -> STR index STR[index] T/F -/IsEndingExpr {% - 2 copy dup Strlen eq - %% if end of str is reached -> end ! - { pop pop 0 true } - %% ending chr -> clpar, comma, |, <, >, =, !, - {get dup dup 41 eq - exch dup 124 eq - exch dup 93 eq - exch dup 44 eq - exch dup 30 eq - exch dup 60 ge exch 62 le and or or or or or} - ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or a +- -%% STR index -> STR index STR[index] T/F -/IsEndingTerm { IsEndingExpr { true } { dup dup 43 eq exch 45 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or */ -%% STR index -> STR index STR[index] T/F -/IsEndingFactor { IsEndingTerm { true } { dup dup 42 eq exch 47 eq or } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% expr is ended by end of str or ^ -%% STR index -> STR index STR[index] T/F -/IsEndingPower { IsEndingFactor { true } { dup 94 eq } ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% STR index -> STR index STR[index] -/NextNonBlankChar { { dup Strlen eq { 0 exit } if 2 copy get dup neBlkChar { exit } if pop 1 add } loop } bind def -/neBlkChar { dup 32 ne exch dup 10 ne exch 9 ne and and } bind def -%%%%%%%%%%%%%%%%%%%%%%%% -%% DEBUG -/BRK {false} def -/BRKtrue {/BRK true def} def -/BRKStop {BRK {BRKtoto} if } def -/BRKEvalStop {BRK exch if } def -/BRKBRK2true {BRK {BRK2true} if } def -/BRK2 {false} def -/BRK2true {/BRK2 true def} def -/BRK2Stop {BRK2 {BRK2toto} if } def/BRK {false} def -end -% -%-------------------------------------------------------------------------------% -% -/tx@AlgToPs 12 dict def tx@AlgToPs begin -% -%% algExpr -> PSVector -/AlgToPs { tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE pop pop EndingSequence end } def -/EndingSequence { ExpressionVector aload length /end cvx exch 1 add array astore } def -/InitParser { /ExpressionVector [ /tx@AddMathFunc cvx /begin cvx ] def dup length /Strlen exch def 0 } def -/Strlen 0 def -/EvalListOfExpr {} def% -/EvalNumber {% - ReadNumber cvr /ExpressionVector ExpressionVector aload length dup 3 add -1 roll cvx - exch 1 add array astore def NextNonBlankChar pop } def -/EvalAddSub {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 43 eq { /add } { /sub } ifelse cvx exch 1 add array astore def -} def -/EvalMulDiv {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - 42 eq { /mul } { /div } ifelse cvx exch 1 add array astore def -} def -/EvalPower {% - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll - pop /exp cvx exch 1 add array astore def -} def -/EvalLiteral {% - ReadLiteral - dup 40 eq%%% there is an open par -> function call - { pop 2 index - dup (Sum) eq { EvalSum } - { dup (IfTE) eq { EvalCond } - { dup (Derive) eq { pop EvalDerive } - { pop 1 add NextNonBlankChar pop AnalyzeListOfE 2 index TrigoFunc - /ExpressionVector ExpressionVector aload length dup 5 add -1 roll cvn cvx - exch 1 add array astore def 1 add NextNonBlankChar pop } ifelse } ifelse} ifelse } - { /ExpressionVector ExpressionVector aload length dup 6 add -1 roll cvn cvx exch 1 add array astore def - dup 91 eq%%% there is an open bracket -> vector element - { pop 1 add NextNonBlankChar pop AnalyzeExpr - /ExpressionVector ExpressionVector aload length /cvi cvx exch /get cvx exch 2 add array astore def 1 add } - { pop NextNonBlankChar pop } - ifelse} - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% the derive function : Derive(n,f(x)) -%% firstparindex lastparindex -> -/EvalDerive { - %% manage the function descripiton - 1 add ReadNumber 3 1 roll NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - 1 add NextNonBlankChar pop - 3 -1 roll cvi - dup 0 eq - { pop AnalyzeExpr 3 -1 roll pop 1 add } - { 1 sub 3 1 roll (x) exch tx@Derive begin DeriveIndexed end 4 -1 roll - { (x) tx@Derive begin Derive end } repeat - ExpressionVector exch /ExpressionVector [] def - AlgToPs aload length - /ExpressionVector 1 index 3 add -1 roll aload length dup 3 add -1 roll /l2 exch def /l1 exch def - l1 l2 add 1 add l2 neg roll l1 l2 add array astore def 3 -1 roll pop 1 add - 1 index length /Strlen exch def } ifelse -} def -/EvalSum {% - pop 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber cvi 3 1 roll - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - /ExpressionVector ExpressionVector aload length dup 7 add -3 roll 0 4 1 roll - 5 -1 roll 4 add array astore def - %% keep ExpressionVector for later and create a new one for internal Sum computation - ExpressionVector 3 1 roll /ExpressionVector [ 6 -1 roll cvn /exch cvx /def cvx ] def - 1 add NextNonBlankChar pop AnalyzeExpr - %% add each term - /ExpressionVector ExpressionVector aload length 1 add /add cvx exch array astore def - /ExpressionVector 4 -1 roll aload length ExpressionVector cvx /for cvx 3 -1 roll 2 add - array astore def 3 -1 roll pop 1 add -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -/EvalCond {% - pop 1 add AnalyzeCond NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - ExpressionVector 3 1 roll /ExpressionVector [] def - 1 add AnalyzeExpr ExpressionVector 3 1 roll /ExpressionVector [] def - NextNonBlankChar 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add AnalyzeExpr - NextNonBlankChar 41 ne { ANALYZER_ERROR_missing_ending parenthesis_in_IfTE } if - ExpressionVector - /ExpressionVector 6 -1 roll aload length dup - 6 add -1 roll cvx exch dup 4 add -1 roll cvx /ifelse cvx 3 -1 roll 3 add array astore def - 1 add 3 -1 roll pop -} def -%% CondOp STR index -/EvalCondOp {% - 3 -1 roll - dup (=) eq { /eq } {% - dup (<) eq { /lt } {% - dup (>) eq { /gt } {% - dup (>=) eq { /ge } {% - dup (<=) eq { /ge } {% - dup (!=) eq { /ne } { ERROR_non_valid_conditional_operator } - ifelse } ifelse } ifelse } ifelse } ifelse } ifelse - cvx exch pop - /ExpressionVector ExpressionVector aload length dup 3 add -1 roll exch 1 add array astore def } def -/EvalUnaryOp { - 3 -1 roll 45 eq { /ExpressionVector ExpressionVector aload length /neg cvx exch 1 add array astore def } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook {} bind def -/PreEvalHook {} bind def -/AnalyzeListOfEPostHook {} bind def -/AnalyzePostHook {} def -/RollOp { 3 1 roll } bind def -end %tx@CoreAnalyzerDict -% -%--------------------------------------------------------------------% -% -/tx@Derive 41 dict def tx@Derive begin -%%increase ^^ for each function added -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable -> PSVector -/Derive {% - 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser AnalyzeListOfE end -} def -/Strlen 0 def -/InitParser { dup length /Strlen exch def 0 } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% algExpr variable index -> PSVector -/DeriveIndexed {% - 3 1 roll 10240 string 3 1 roll 0 3 1 roll - /Variable exch def - tx@CoreAnalyzerDict begin InitParser pop 4 -1 roll AnalyzeExpr 4 -2 roll pop pop 4 -2 roll exch pop end -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u,v)'=-(u',v') -/EvalListOfExpr {% - 4 2 roll 2 copy 9 -1 roll dup length 4 1 roll putinterval add AddPipe - 2 copy 7 -1 roll dup length 4 1 roll putinterval add - 6 -2 roll pop pop - 2 copy pop 0 6 2 roll GetIntervalNewStr 5 1 roll 2 copy 0 exch getinterval 6 1 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (-u)'=-(u') -/EvalUnaryOp { - 4 -2 roll 4 index (0) eq - { (0) StrConcat 7 -1 roll pop } - { 7 -1 roll 45 eq - { AddSub AddOpPar true } { false } ifelse - 3 1 roll 5 index StrConcat 3 -1 roll { AddClPar } if } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - 7 -2 roll pop pop 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (number)'=0 -/EvalNumber { ReadNumber (0) 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u+v)'=u'+v' -/EvalAddSub {% - 7 index dup (0) eq - { pop true }%% du=0 nothing added - { dup length exch 5 index 5 index 3 -1 roll putinterval 4 -1 roll add 3 1 roll false } - ifelse - 5 index dup (0) eq - { pop { (0) } { 4 -2 roll 2 copy pop 0 6 2 roll GetIntervalNewStr } ifelse }%%dv=0 - { exch - { 5 -2 roll 7 index 45 eq { AddSub } if false } %%nothing yet added - { 5 -2 roll 7 index 43 eq%%something yet added - { AddAdd false } { AddSub AddOpPar true } ifelse } - ifelse 11 1 roll - 3 -1 roll StrConcat 10 -1 roll { AddClPar } if - 2 copy pop 0 6 2 roll GetIntervalNewStr } - ifelse - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)' or (u/v)' -/EvalMulDiv { 6 index 42 eq {EvalMul} {EvalDiv} ifelse } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u*v)'=u'*v+u*v' -/EvalMul {% - 4 -2 roll 7 index dup (0) eq - { pop false }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if - true }%%du!=0 - ifelse - 5 1 roll 5 index (0) eq - { 5 -1 roll not { (0) StrConcat } if }%%dv=0 - { 5 -1 roll { AddAdd } if - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - }%%dv!=0 - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u/v)'=(u'*v-u*v')/v^2 -/EvalDiv {% - 4 -2 roll - 4 index (0) eq%%dv=0 -> u'/v - { 7 index (0) eq { (0) StrConcat } { AddOpPar 7 index StrConcat AddClPar AddDiv 5 index StrConcat } ifelse } - { 7 index dup (0) eq - { pop }%%du=0 - { (1) eq%%du=1 - { false } - { AddOpPar 7 index StrConcat AddClPar AddMul AddOpPar true } ifelse - 3 1 roll 6 index StrConcat 3 -1 roll { AddClPar } if}%%du!=0 - ifelse - AddSub - 4 index (1) eq - { 8 index StrConcat } - { AddOpPar 8 index StrConcat AddClPar AddMul AddOpPar 4 index StrConcat AddClPar } - ifelse - %}%%dv!=0 - 2 copy GetIntervalNewStr 3 1 roll pop 0 AddOpPar 3 -1 roll StrConcat AddClPar - AddDiv AddOpPar 5 index StrConcat AddClPar 2 copy (^2) putinterval 2 add } - ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str1 index str2 -> str1 index -/StrConcat { dup length 4 2 roll 2 copy 6 -1 roll putinterval 3 -1 roll add } bind def -/GetIntervalNewStr { 0 exch getinterval dup length string copy } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (u^v)'=(u^v)'=u'vu^(v-1)+v'u^(v)ln(u) -/EvalPower {% - 4 -2 roll 7 index (0) eq - {%%if du=0 then (u^v)'=v'ln(u)u^v - 4 index (0) eq - { (0) StrConcat }%%if dv=0 then (u^v)'=0 - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if - 8 index (e) ne { (ln\() StrConcat 8 index StrConcat (\)*) StrConcat } if - AddOpPar 8 index StrConcat (\)^\() StrConcat 5 index StrConcat AddClPar } ifelse - } - {%%du!=0 - 4 index (0) eq - {%%if dv=0 then (u^v)'=vu'u^(v-1) - 5 index dup IsStrNumber - { dup (0) eq - { StrConcat } - { dup dup (1) eq exch (1.0) eq or - { StrConcat } - { StrConcat - 7 index dup (1) ne exch (1.0) ne and%%%dr 09102006 insert du if <> 1 - { (*\() StrConcat 7 index StrConcat (\)) StrConcat } if%%%dr 09102006 - (*\() StrConcat 8 index StrConcat (\)) StrConcat - 5 index dup dup (2) eq exch (2.0) eq or - { pop } { cvr 1 sub 20 string cvs 3 1 roll (^) StrConcat 3 -1 roll StrConcat } ifelse } ifelse } ifelse } - { pop AddOpPar 5 index StrConcat (\)*\() StrConcat 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)) StrConcat } ifelse - } - {%%if dv!=0 and du!=0 then (u^v)'=u'vu^(v-1)+v'u^(v)ln(u) - 7 index (1) ne { AddOpPar 7 index StrConcat (\)*) StrConcat } if - AddOpPar 5 index StrConcat (\)*\() StrConcat - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (-1\)+\() StrConcat - 4 index (1) ne { 4 index StrConcat (\)*\() StrConcat } if - 8 index StrConcat (\)^\() StrConcat - 5 index StrConcat (\)*ln\() StrConcat - 8 index StrConcat AddClPar - } ifelse - } ifelse - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% str -> true/false -/IsStrNumber {% - true exch - { dup 48 lt exch dup 57 gt 3 -1 roll or - exch dup 46 ne%%. - exch dup 43 ne%%+ - exch 45 ne%%- - and and and { pop false } if } forall -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalLiteral {% - ReadLiteral dup 40 eq%%% there is an open par -> function call - { pop (EvalFunc_ ) 9 4 index StrConcat 0 exch getinterval cvn cvx exec } - { dup 91 eq%%% there is an open bracket -> vector element - { ERROR_vector_not_yet_implemented } - { pop EvalVariable } - ifelse } - ifelse -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% first last parpos Expr[first:parpos-1] -> -/EvalVariable { 2 index Variable eq { (1) } { (0) } ifelse 4 -1 roll exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% (f(u))'=u'f'(u) -/EvalFunc { - 4 2 roll 4 index (1) ne - { AddOpPar 4 index StrConcat (\)*) StrConcat } if - (Eval ) 4 8 index StrConcat 0 exch getinterval cvn cvx exec - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Func derivative -> Eval<func> -/EvalFunc_sin {% - PreCommonFunc - { (cos\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_cos {% - PreCommonFunc - { (\(-sin\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_tan {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/cos\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_asin {% - PreCommonFunc - { (1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_acos {% - PreCommonFunc - { (-1/sqrt\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_atg {% - PreCommonFunc - { (1/\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_ln {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_exp {% - PreCommonFunc - { (exp\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_sqrt {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/\(2*sqrt\() StrConcat 5 index StrConcat (\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Fact {% - PreCommonFunc { ERROR_no_variable_expression_in_Fact } if - PostCommonFunc } def -/EvalFunc_sh {% - PreCommonFunc - { (ch\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_ch {% - PreCommonFunc - { (sh\() StrConcat 5 index StrConcat AddClPar } if - PostCommonFunc } def -/EvalFunc_th {% - PreCommonFunc - { dup 0 eq { (1) StrConcat } { 1 sub } ifelse (/ch\() StrConcat 5 index StrConcat (\)^2) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argsh {% - PreCommonFunc - { (1/sqrt\(1+\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argch {% - PreCommonFunc - { (1/sqrt\(\() StrConcat 5 index StrConcat (\)^2-1\)\)) StrConcat } if - PostCommonFunc } def -/EvalFunc_Argth {% - PreCommonFunc - { (1/\(1-\() StrConcat 5 index StrConcat (\)^2\)\)) StrConcat } if - PostCommonFunc } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/PreCommonFunc { - 1 add NextNonBlankChar pop 3 -1 roll 5 1 roll AnalyzeExpr 1 add NextNonBlankChar pop - 4 2 roll 4 index (0) eq - { (0) StrConcat false } - { 4 index (1) ne { AddOpPar 4 index StrConcat (\)*) StrConcat } if true } ifelse -} def -/PostCommonFunc { - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -/EvalFunc_Derive {% - 1 add ReadNumber cvi 1 add dup cvr log 1 add cvi string cvs - 4 -1 roll pop 5 1 roll 1 add NextNonBlankChar pop AnalyzeExpr 1 add - 4 -2 roll (Derive\() StrConcat 7 -1 roll StrConcat (,) StrConcat 6 -1 roll StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr 6 -1 roll pop 2 index 6 index dup 4 index exch sub getinterval - exch 6 2 roll } def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_Sum {% - 1 add NextNonBlankChar pop - %% read the variable name - ReadLiteral pop 3 -1 roll pop NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_Sum } if - %% read the initial value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_second_comma_in_Sum } if - %% read the increment value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_third_comma_in_Sum } if - %% read the limit value - 1 add NextNonBlankChar pop ReadNumber pop - 2 copy get 44 ne { ANALYZER_ERROR_missing_fourth_comma_in_Sum } if - 1 add NextNonBlankChar pop dup 6 1 roll 3 -1 roll pop AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 8 index dup 9 index exch sub getinterval StrConcat - 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 9 -3 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% literal switch -> func call, vector, variables -/EvalFunc_IfTE {% - 3 -1 roll pop 1 add NextNonBlankChar pop SkipCond - NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_first_comma_in_IfTE } if - 1 add NextNonBlankChar pop dup 5 1 roll - AnalyzeExpr NextNonBlankChar - 44 ne { ANALYZER_ERROR_missing_second_comma_in_IfTE } if - 1 add NextNonBlankChar pop - AnalyzeExpr 1 add NextNonBlankChar pop - 4 -2 roll 3 index 10 index dup 11 index exch sub getinterval StrConcat - 6 index StrConcat (,) StrConcat 4 index StrConcat AddClPar - 2 copy pop 0 6 2 roll GetIntervalNewStr - mark 11 -5 roll cleartomark 2 index 6 index dup 4 index exch sub getinterval exch 6 2 roll -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% advance in str until a comma is found (no error detection!) -%% str index -> str index' -/SkipCond { { 1 add 2 copy get 44 eq {exit } if } loop } bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Convert to radians if trigo function call -%% (name) -> -/TrigoFunc { - dup (cos) eq 1 index (sin) eq or exch (tan) eq or - { /ExpressionVector ExpressionVector aload length Pi /div cvx 180 /mul cvx 5 -1 roll 4 add - array astore def - } if -} def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% No derivative for condition.... -/EvalCondOp { 3 -1 roll pop } bind def -/PutIntervalOneAdd {putinterval 1 add} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddOpPar {2 copy (\() PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add close parenthesis in string at the given index -%% str index -> str index+1 -/AddClPar {2 copy (\)) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add 0 in string at the given index -%% str index -> str index+1 -/AddZero {2 copy (0) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddMul {2 copy (*) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add open parenthesis in string at the given index -%% str index -> str index+1 -/AddDiv {2 copy (/) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a plus sign in string at the given index -%% str index -> str index+1 -/AddAdd {2 copy (+) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a minus sign in string at the given index -%% str index -> str index+1 -/AddSub {2 copy (-) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Add a pipe sign in string at the given index -%% str index -> str index+1 -/AddPipe {2 copy (|) PutIntervalOneAdd} bind def -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% H O O K S -/AnalyzePreHook { dup 5 1 roll } bind def -/PreEvalHook {} def -/AnalyzePostHook { 7 -1 roll pop } bind def -/AnalyzeListOfEPostHook { 6 -1 roll mark 6 1 roll cleartomark } bind def -/RollOp { 5 1 roll } bind def -end%%%tx@CoreAnalyzerDict -/tx@AddMathFunc 12 dict def tx@AddMathFunc begin -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% NEW FUNC -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% function arcsine in radians asin(x)=atan(x/sqrt(1-x^2)) -%% x -> theta -/asin {% - dup abs 1 gt { EQDFasinrangeerror } if - dup dup dup mul 1 exch sub sqrt atan exch 0 lt { 360 sub } if DegtoRad -} def -%% function arccosine in radians acos(x)=atan(sqrt(1-x^2)/x) -%% x -> theta -/acos {% - dup abs 1 gt { EQDFacosrangeerror } if - dup dup mul 1 exch sub sqrt exch atan DegtoRad -} def -%% function arctangent in radians -%% x -> theta -/atg { 1 atan dup 90 gt { 360 sub } if DegtoRad } bind def -%% HYPERBOLIC FUNCTIONS -/sh { dup Ex exch neg Ex sub 2 div } def -/ch { dup Ex exch neg Ex add 2 div } def -/th { dup sh exch ch div } def -/Argsh { dup dup mul 1 add sqrt add ln } def -/Argch { dup dup mul 1 sub sqrt add ln } def -/Argth { dup 1 add exch 1 exch sub div ln 2 div } def -%% modified exponential funtion for 0 -%% x n -> x^n -/Exp { dup 0 eq { pop pop 1 } { exp } ifelse } bind def -%% modified exponential funtion for 0 -%% x -> e^x -/Ex { Euler exch exp } bind def -%% -%% factorial function -%% n -> n! -/Fact { 1 exch 2 exch 1 exch { mul } for } bind def -/fact { Fact } bind def -end - -% END pstricks.pro - -%%EndProcSet -%%BeginProcSet: pst-dots.pro 0 0 -% $Id: pst-dots.pro 7 2007-12-29 22:21:13Z herbert $ -% -%% PostScript prologue for pstricks.tex. -%% Version 2.00, 2006/12/19 -%% For distribution, see pstricks.tex. -%% -%% Timothy Van Zandt <tvz@Princeton.EDU> -%% -%% Modified by Etienne Riga - Dec. 16, 1999 -%% Modified by Herbert Voss (hv) - 2004/12/27 -%% Modified by Etienne Riga - 2005/01/01 (er) -%% to add /Diamond, /SolidDiamond and /BoldDiamond -% -10 dict dup begin - /FontType 3 def - /FontMatrix [.001 0 0 .001 0 0] def - /FontBBox [-571.5 -742.5 571.5 742.5] def -% /FontBBox [-1000 -1000 1000 1000] def -% See end of file in /BuildGlyph - /Encoding 256 array def - 0 1 255 {Encoding exch/.notdef put} for - Encoding - dup (b) 0 get /Bullet put - dup (c) 0 get /Circle put - dup (C) 0 get /BoldCircle put - dup (u) 0 get /SolidTriangle put - dup (t) 0 get /Triangle put - dup (T) 0 get /BoldTriangle put - dup (r) 0 get /SolidSquare put - dup (s) 0 get /Square put - dup (S) 0 get /BoldSquare put - dup (q) 0 get /SolidPentagon put - dup (p) 0 get /Pentagon put - dup (P) 0 get /BoldPentagon put -%%% - dup (k) 0 get /Asterisk put - dup (K) 0 get /BoldAsterisk put - dup (J) 0 get /SolidAsterisk put - dup (h) 0 get /Hexagon put - dup (H) 0 get /BoldHexagon put - dup (G) 0 get /SolidHexagon put - dup (a) 0 get /Add put - dup (A) 0 get /BoldAdd put - dup (x) 0 get /Mul put - dup (X) 0 get /BoldMul put - dup (m) 0 get /Oplus put - dup (M) 0 get /BOplus put - dup (e) 0 get /SolidOplus put - dup (n) 0 get /Otimes put - dup (N) 0 get /BOtimes put - dup (E) 0 get /SolidOtimes put - dup (i) 0 get /Bar put - dup (I) 0 get /BoldBar put - dup (l) 0 get /SolidDiamond put - dup (d) 0 get /Diamond put - (D) 0 get /BoldDiamond put -%%% -/CharProcs 47 dict def - CharProcs begin - /CirclePath {0 0 500 0 360 arc closepath} def - /Bullet {CirclePath fill} def - /Circle {CirclePath .9 .9 scale CirclePath eofill} def - /BoldCircle {CirclePath .8 .8 scale CirclePath eofill} def - /TrianglePath {0 660 moveto -571.5 -330 lineto 571.5 -330 lineto - closepath} def - /SolidTriangle {TrianglePath fill} def - /Triangle {TrianglePath .85 .85 scale TrianglePath eofill} def - /BoldTriangle {TrianglePath .7 .7 scale TrianglePath eofill} def - /SquarePath {-450 450 moveto 450 450 lineto 450 -450 lineto -450 -450 lineto - closepath} def - /SolidSquare {SquarePath fill} def - /Square {SquarePath .89 .89 scale SquarePath eofill} def - /BoldSquare {SquarePath .78 .78 scale SquarePath eofill} def - /PentagonPath {-337.8 -465 moveto 337.8 -465 lineto 546.6 177.6 lineto - 0 574.7 lineto -546.6 177.6 lineto closepath} def - /SolidPentagon {PentagonPath fill} def - /Pentagon {PentagonPath .89 .89 scale PentagonPath eofill} def - /BoldPentagon {PentagonPath .78 .78 scale PentagonPath eofill} def -%-------------- hv begin 2004/07/25 from: er 2003/03/24 - /HexagonPath {0 550 moveto -476 275 lineto -476 -275 lineto - 0 -550 lineto 476 -275 lineto 476 275 lineto closepath} def - /SolidHexagon {HexagonPath fill} def - /Hexagon {HexagonPath .89 .89 scale HexagonPath eofill} def - /BoldHexagon {HexagonPath .79 .79 scale HexagonPath eofill} def - /AsteriskPath {20 0 moveto 10 250 180 500 0 500 curveto - -180 500 -10 250 -20 0 curveto closepath} def - /Asterisk {AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - 60 rotate AsteriskPath 60 rotate AsteriskPath 60 rotate AsteriskPath - fill} def - /Basterp {50 250 220 500 0 500 curveto - -220 500 -50 250 -50 30 cos 100 mul curveto} def - /BoldAsteriskPath {50 30 cos 100 mul moveto Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp 60 rotate Basterp - 60 rotate Basterp closepath} def - /BoldAsterisk {BoldAsteriskPath fill} def - /SolidAsterisk {CirclePath .9 .9 scale BoldAsteriskPath eofill} def - /CrossPath {40 550 moveto -40 550 lineto -40 40 lineto -550 40 lineto - -550 -40 lineto -40 -40 lineto -40 -550 lineto 40 -550 lineto - 40 -40 lineto 550 -40 lineto 550 40 lineto 40 40 lineto closepath} def - /BoldCrossPath {80 550 moveto -80 550 lineto -80 80 lineto -550 80 lineto - -550 -80 lineto -80 -80 lineto -80 -550 lineto 80 -550 lineto - 80 -80 lineto 550 -80 lineto 550 80 lineto 80 80 lineto closepath} def - /Add {CrossPath fill} def - /Mul {45 rotate CrossPath fill} def - /BoldAdd {BoldCrossPath fill} def - /BoldMul {45 rotate BoldCrossPath fill} def - /Oplus {CirclePath .9 .9 scale CirclePath eofill - .775 .775 scale CrossPath fill} def - /SolidOplus {CirclePath .775 .775 scale BoldCrossPath eofill} def - /BOplus {CirclePath .8 .8 scale CirclePath eofill - .775 .775 scale BoldCrossPath fill} def - /Otimes {CirclePath .9 .9 scale CirclePath eofill - 45 rotate .775 .775 scale CrossPath fill} def - /BOtimes {CirclePath .8 .8 scale CirclePath eofill - 45 rotate .775 .775 scale BoldCrossPath fill } def - /SolidOtimes {CirclePath 45 rotate .775 .775 scale BoldCrossPath eofill} def - /BarPath {40 660 moveto -40 660 lineto -40 -660 lineto 40 -660 lineto - closepath} def - /Bar {BarPath fill} def - /BoldBarPath {80 660 moveto -80 660 lineto -80 -660 lineto 80 -660 lineto - closepath} def - /BoldBar {BoldBarPath fill} def - /DiamondPath {0 742.5 moveto -428.5 0 lineto 0 -742.5 lineto - 428.5 0 lineto closepath} def - /SolidDiamond {DiamondPath fill} def - /Diamond {DiamondPath .865 .865 scale DiamondPath eofill} def - /BoldDiamond {DiamondPath .73 .73 scale DiamondPath eofill} def -%%% - /.notdef { } def - end - /BuildGlyph { - exch - begin -% Metrics 1 index get exec 0 - 0 0 -% BBoxes 3 index get exec - -1000 -1000 1000 1000 -% -571.5 -742.5 571.5 742.5 - setcachedevice - CharProcs begin load exec end - end - } def - /BuildChar { - 1 index /Encoding get exch get - 1 index /BuildGlyph get exec - } bind def -end -/PSTricksDotFont exch definefont pop - - -%%EndProcSet -%%BeginProcSet: texps.pro 0 0 -%! -TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 -index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll -exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics -exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub -dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} -ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict -end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ -dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 -roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def -dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} -if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} -def end - -%%EndProcSet -%%BeginProcSet: special.pro 0 0 -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro 0 0 -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -%%BeginFont: CMR10 -%!PS-AdobeFont-1.1: CMR10 1.00B -%%CreationDate: 1992 Feb 19 19:54:52 -% Copyright (C) 1997 American Mathematical Society. All Rights Reserved. -11 dict begin -/FontInfo 7 dict dup begin -/version (1.00B) readonly def -/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def -/FullName (CMR10) readonly def -/FamilyName (Computer Modern) readonly def -/Weight (Medium) readonly def -/ItalicAngle 0 def -/isFixedPitch false def -end readonly def -/FontName /CMR10 def -/PaintType 0 def -/FontType 1 def -/FontMatrix [0.001 0 0 0.001 0 0] readonly def -/Encoding 256 array -0 1 255 {1 index exch /.notdef put} for -dup 65 /A put -dup 66 /B put -dup 67 /C put -readonly def -/FontBBox{-251 -250 1009 969}readonly def -currentdict end -currentfile eexec -D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 -016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 -9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F -D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 -469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 -2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 -87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F -D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 -92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C -295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75 -409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C -4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF -2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E -0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E -B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008 -24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B -43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF -D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575 -5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC -96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3 -7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3A3B198747B4DC992E -839A610506453BA7B2A56B2C552FDBE23916074DD54D39ED27A52D90D5D74B07 -A5265E72E3F2E0ACD9513E056F15E4BCBB9F409A6F39DEAE8D919C80EC13C56F -4864A6CCFF1ACFDA3D992F46D45571FC760DFF6EBFB011B6C123167CA96B77A0 -CFA8861BE3814E002E0A571E62C497886A135ACB53C0ACF7FECCEEF3FA4DC436 -9115AF71C9CA5E9E71CAAF5A17D5598D8E8BB772EF73E44F07BFCEA039DFB0F7 -E2C38F138EE0922FBDD3D7BA9CD9676102B0B9E22A4744EDBF299DB408B7B0B9 -B66DC8BDB8552BA01AEE38E1205B077C2F2C646747C748125F1CCF350E3930AD -AE5249B3D5CAE219454906C86EAB1DF73EEC1E8AFA68C7E230DAD77D9A072873 -B96E9DEF3EAEC6D5B9A045F9280D79AC9E0857AC916FC29DB487A669486DE827 -DFA3C487FBAEBCBBCB9558497A66CE72491373354376AEF7374AE1D709EC9A16 -4C369C237DD28FC4BE2843036E872B2A008D0DDEA0146E9E5F0EF49715BDCDAB -D4EFA0BD65C6822D70B0FBD115BE7EBCE816AB40D2ECDB17E15F2ADB75A84589 -BE79A66E6C29ACE5156971C30E226B3FC1A7CBFE350C693B23476C3C77F0D214 -06751D2DECCA6D14A899C877A1F71CF5F205C8FF35460B3792108C17A29A339F -99A0BE9FC33A702D808AAB91FD490E6E8C0D59356D2B2CD44371D02D3D040D8F -121CE31CCECE5DDAE9C44E87F9139DEB1AB6D393E6EADB7A3A33B4217523EC3F -FEC90D8B22E6CCBE26B11E71F55ED334888AC82AD91C436891DB5661343DFD20 -B6BD794BA985601ED4815E880DF113EDF1D48F7A7E82CB512AA62334D7354C64 -E7B988D9FB9F4898A1A6C3C225809E6C2EFBC4550A0CD2F4074889924F5978BF -BC4BC8D5C560FB448BC58D6183D4944ED038C4EDF065F94953319615BB532BEC -2F81D075393069E3205D061A6F5E6367922AEE12F7B0A0AFBEFB7B0C05C0959F -35807A7D15BD753FD79704123B28C14F22DE069DDD7455E31D6B17E167002EB8 -885B50A26D1B4869629219E63AFD2475C6C5E166F4AD97B59DE0BF534FC05192 -E90A68AC5D3A5E4CD38F484FB8326710D8B7237B2D6FB06F152E7F465A7415AE -AA5DA0967D8DB306AE3D6749892C91FE9FB692C0AD513198F4B9E2AC7F7CC177 -7567D890B960D070E8BE3DDDD724E0662367DA0AA3CC81D150C631B2D432CBC5 -F2D0191A687F3B8B01A1BCAEE46B7F6BC0D48E2DC86539524D7A1EA4849402CD -2FD3A232401465F44AA52CA4C2CD4CF06955E32A786894C1AE2C7358AC60C7B6 -D378C0EDAC363F0187BF819C940144AC477886830ECC8EBDDBC6C477616C5865 -D98BA4942511E5251D126C29BAC56DE4408C8314C79C85A299BCE712DD68D9D5 -EE10CD0AE1745996A7694350DFFAD7EF063A594D2A204B674B5E1118853CECE8 -5D4DAD30B8C8DC91D473F24153F513B758B0C92A1E5F04860604999D7E42EADB -A5BA39588B0BA0A2F13E34C6229D7C6F0110C4015B21E618C386E9D8DFEB2FCE -5D9C69D7D7C1DB6F776B3052C80C9175A4A8CBA9192C82C0520D5B06B7D1978C -1CA45CE52A081D47A53C4CB8C9101D6661CBD6B57700BEE502BBFB45647C275B -F0D9BCBF311C06F6D263B0F7D0CD123C265E86D1C0B40026C184D8051BE9A277 -D3AE586439E71CCD5A2EB0DE72003E9B28485A -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000 -cleartomark -%%EndFont -TeXDict begin 40258437 52099154 1000 600 600 (pst_uput.dvi) -@start /Fa 188[60 59 62 65[{}3 83.022 /CMR10 rf end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin - end -%%EndSetup -TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 TeXcolorgray -1 TeXcolorgray 1 TeXcolorgray 639 756 399 316 v 1 TeXcolorgray -0 TeXcolorgray 656 739 a @beginspecial @setspecial - tx@Dict begin STP newpath 0.8 SLW 0 setgray [ 20.0 30.0 40.0 0.0 -0.0 0.0 /Lineto /lineto load def false 0 setlinejoin Polygon gsave -0.8 SLW 0 setgray 1. .setopacityalpha 0 setlinecap stroke grestore -end - -@endspecial -552 767 a Fa(A)415 b(B)792 448 y(C)p 1 TeXcolorgray 0 -TeXcolorgray 0 TeXcolorgray 0 TeXcolorgray eop end -%%Trailer - -userdict /end-hook known{end-hook}if -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig.mps deleted file mode 100644 index a8309780ba9..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig.mps +++ /dev/null @@ -1,34 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%BoundingBox: -5 -12 5 12 -%%HiResBoundingBox: -4.98131 -11.43991 4.9813 11.0467 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1559 -%%Pages: 1 -%%DocumentResources: procset mpost-minimal -%%+ font gkaiu53 gkaiu59 -%%DocumentSuppliedResources: procset mpost-minimal -%%DocumentNeededResources: font gkaiu53 gkaiu59 -%%IncludeResource: font gkaiu53 -%%IncludeResource: font gkaiu59 -%%EndComments -%%BeginProlog -%%BeginResource: procset mpost-minimal -/bd{bind def}bind def/fshow {exch findfont exch scalefont setfont show}bd -/fcp{findfont dup length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall}bd -/fmc{FontMatrix dup length array copy dup dup}bd/fmd{/FontMatrix exch def}bd -/Amul{4 -1 roll exch mul 1000 div}bd/ExtendFont{fmc 0 get Amul 0 exch put fmd}bd -/SlantFont{fmc 2 get dup 0 eq{pop 1}if Amul FontMatrix 0 get mul 2 exch put fmd}bd -%%EndResource -%%EndProlog -%%BeginSetup - /gkaiu53 /gkaiu53 def - /gkaiu59 /gkaiu59 def -%%EndSetup -%%Page: 1 1 - 0 0 0 setrgbcolor --4.98131 3 moveto -(\315) gkaiu53 9.96265 fshow --4.98131 -11.2678 moveto -(\015) gkaiu59 9.96265 fshow -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig_left.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig_left.mps deleted file mode 100644 index 52a5dc82251..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig_left.mps +++ /dev/null @@ -1,18 +0,0 @@ -%!PS -%%BoundingBox: -5 -11 5 13 -%%HiResBoundingBox: -4.98131 -10.8925 4.9813 12.14189 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%*Font: gkaiu6e 9.96265 9.96265 05:8 -%*Font: gkaiu66 9.96265 9.96265 0e:8 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor --4.98131 3.7338 moveto -(\005) gkaiu6e 9.96265 fshow --4.98131 -10.7786 moveto -(\016) gkaiu66 9.96265 fshow -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig_right.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig_right.mps deleted file mode 100644 index a18c4f9d81a..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/subfig_right.mps +++ /dev/null @@ -1,18 +0,0 @@ -%!PS -%%BoundingBox: -5 -12 5 12 -%%HiResBoundingBox: -4.98131 -11.43991 4.9813 11.0467 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%*Font: gkaiu53 9.96265 9.96265 cd:8 -%*Font: gkaiu59 9.96265 9.96265 0d:8 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor --4.98131 3 moveto -(\315) gkaiu53 9.96265 fshow --4.98131 -11.2678 moveto -(\015) gkaiu59 9.96265 fshow -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/transform.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/transform.mps deleted file mode 100644 index 6a69a91ecdd..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/transform.mps +++ /dev/null @@ -1,25 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 91 18 -%%HiResBoundingBox: -0.49814 -0.49814 90.16168 17.75394 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.05.02:1619 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.99626 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -19.92523 0 lineto -9.96262 17.2552 lineto - closepath stroke -newpath 29.88785 0 moveto -69.73831 0 lineto -49.81308 17.2552 lineto - closepath stroke -newpath 79.70093 0 moveto -89.66354 17.2558 lineto -69.73875 17.25551 lineto - closepath stroke -showpage -%%EOF diff --git a/Master/texmf-dist/doc/generic/lnotes/src/examples/uline.mps b/Master/texmf-dist/doc/generic/lnotes/src/examples/uline.mps deleted file mode 100644 index e74cefabe35..00000000000 --- a/Master/texmf-dist/doc/generic/lnotes/src/examples/uline.mps +++ /dev/null @@ -1,15 +0,0 @@ -%!PS -%%BoundingBox: -1 -1 101 51 -%%HiResBoundingBox: -0.25 -0.25 100.25 50.25 -%%Creator: MetaPost 1.003 -%%CreationDate: 2008.04.24:1054 -%%Pages: 1 -%%BeginProlog -%%EndProlog -%%Page: 1 1 - 0 0 0 setrgbcolor 0 0.5 dtransform truncate idtransform setlinewidth pop - [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit -newpath 0 0 moveto -100 50 lineto stroke -showpage -%%EOF |