-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhw10.eps
3776 lines (3701 loc) · 152 KB
/
hw10.eps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%!PS-Adobe-2.0 EPSF-2.0
%%Creator: dvips(k) 5.996 Copyright 2016 Radical Eye Software
%%Title: C:\Users\Yang\Desktop\tt\Jaxo_tmp.dvi
%%CreationDate: Fri Feb 09 13:41:10 2018
%%BoundingBox: 71 534 581 720
%%DocumentFonts: CMMI12 CMR12 CMSY10
%%EndComments
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -E -o C:\Users\Yang\Desktop\tt\hw10.eps
%+ C:\Users\Yang\Desktop\tt\Jaxo_tmp.dvi
%DVIPSParameters: dpi=600
%DVIPSSource: TeX output 2018.02.09:1341
%%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
/dir 0 def/dyy{/dir 0 def}B/dyt{/dir 1 def}B/dty{/dir 2 def}B/dtt{/dir 3
def}B/p{dir 2 eq{-90 rotate show 90 rotate}{dir 3 eq{-90 rotate show 90
rotate}{show}ifelse}ifelse}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 919 2014-05-19 18:42:47Z herbert $
%
%% PostScript prologue for pstricks.tex.
%% Version 1.24, 2016/04/22
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%
%
% Define the follwing gs-functions if not known, eg when using distiller
%
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 % the main PSTricks dictionary
tx@Dict begin
/ADict 25 dict def % The arrow dictionary
/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
/Log { dup 1e-20 lt { pop -1e30 }{ log } ifelse } def % control the log
/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
/Acos2 { 2 dict begin
/x ED /y ED
y abs 1.0e-20 lt { 1.0e30 } if
x y div
dup dup mul neg 1 add dup 0 lt { % arc cos needs two values x,y
pop pop 0 }{ sqrt exch atan} ifelse
y 0 lt { 180 add } if
} 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
/PtoCab { dup cos 4 -1 roll mul 3 1 roll sin mul } def % Polar to Cartesian (Ellipse) a b phi-> x y
%/Rand { rand 4294967295 div } def % a real random number
/Rand { rand 2147483447 div } def % a real random number between 0 and 1
%----------------- 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
%
/startGlobal { true setglobal globaldict begin } bind def
/endGlobal { end false setglobal } bind def
/pssetRGBcolor /setrgbcolor load def
/pssetCMYKcolor /setcmykcolor load def
/pssetGraycolor /setgray load def
%
%----------------- 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 % BP/PT scaling
/STV { SDict begin normalscale end STP } def %
%
/DashLine {
dup 0 gt
{ /a .5 def PathLength exch div }
{ pop /a 1 def PathLength } ifelse
/b ED % pattern should fit evenly in b
dup /X ED % pattern array
0 get /y ED % length of first black segment
/z 0 X {add} forall def % length of the full pattern
%% Computation of the scaling factor as described by van Zandt:
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
%%%% scaling factor on stack.
/z ED %% now, z is the scaling factor
false % for the length test below
X { z mul } forall X astore %% modification TN 04-08-07
%%% Checking whether at least one dash in X has positive length:
{0 gt or} forall
{ X 1 a sub y mul }
{ [ 1 0 ] 0 }
ifelse
setdash stroke
} def
%
/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
%
/SymbolLine { % on stack [ x y x y ...
counttomark % number of elements
2 div cvi /n ED % n pairs
/YA ED /XA ED % the start point
n 1 sub {
/YB ED /XB ED
/XLength XB XA sub def
/YLength YB YA sub def
/PAngle YLength XLength Atan def
/XYLength XLength YLength Pyth def
%% for negative SymStep we calculate the distance
SymStep 0 lt
{ %XYLength SymStep div abs cvi
/nSym SymStep abs cvi def }
{ /nSym XYLength SymStep div cvi def }
ifelse
0.5 setflat
/Shift Symbol stringwidth pop 2 div def
/deltaX XLength nSym div def
/deltaY YLength nSym div def
curveticks
{ XA YA moveto }
{ XA Shift sub YA Shift sub moveto }
ifelse
nSym {
gsave
curveticks
{ PAngle 180 sub CorrAngle sub tickAngle add /rotAngle ED
currentpoint translate rotAngle rotate
0 SymbolWidth 2 div moveto 0 SymbolWidth 2 div neg lineto
SymbolLinewidth setlinewidth stroke
}
{
rotateSymbol { PAngle 180 sub CorrAngle sub rotate } if
Symbol show
}
ifelse
grestore
deltaX deltaY rmoveto
} repeat
/YA YB def /XA XB def
} repeat
curveticks
{ XA YA moveto }
{ XA Shift sub YA Shift sub moveto }
ifelse
gsave
curveticks
{ PAngle 180 sub CorrAngle sub tickAngle add /rotAngle ED
XA YA translate rotAngle rotate
0 SymbolWidth 2 div moveto 0 SymbolWidth 2 div neg lineto
SymbolLinewidth setlinewidth stroke
}
{
rotateSymbol { PAngle 180 sub CorrAngle sub rotate } if
Symbol show
}
ifelse
grestore
pop % delete the mark symbol
} 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
clipType % must be defined in pstricks.tex: clip -- eoclip
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
%
/DotFill {% on stack: dot radius
/dotRadius 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 % llx lly urx ury of smallest bounding box
/y2 ED /x2 ED /y1 ED /x1 ED
y2 y1 sub a div 2 add cvi /Ny ED
x2 x1 sub a div 2 add cvi /Nx ED
clipType % must be defined in pstricks.tex: clip -- eoclip
newpath
/yA y1 dotRadius add CLW add def
/xA0 x1 dotRadius add CLW add def
Ny {
/xA xA0 def
Nx {
newpath
xA yA dotRadius 0 360 arc
SolidDot { gsave fill grestore } if
stroke
xA a add /xA ED
} repeat
yA a add /yA ED
} repeat
grestore
} def
%
/PenroseFill {% on stack: scaling factor
/Scale ED
% 1 exch div round /penroseFactor 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
gsave
220 150 translate
Scale dup scale
systemdict /setstrokeadjust known { true setstrokeadjust } if
/I/S/L/W/G/+/Z/F/E/D[/def/exch/for{E D}/add{s E get mul}
{ Z -36.2001 1 33 }{25 E S rlineto}{/q Z dup q G E q 1 + G}{Z 2 2}]{cvx def}forall
[0 72 1008 {dup sin E cos }F ]1 setlinejoin/s W{/a W{/b I 10{/i I 4{/m I moveto
i m +/j I 10{/l Z b m l + G a l G sub s m get div .2 + floor .3 + 25
mul j l + S rmoveto}F i L j L stroke }F}F}F}F
grestore
% pop pop
} def
%
/PenroseFillA {% on stack: scaling factor, border color, kite color, dart color
/Scale ED
Scale dup scale
/border_colour ED
/kite_colour ED
/dart_colour ED
clip
newpath
gsave
100 100 translate
6
Scale 1 lt { 1 Scale dup add div mul cvi } if %%%% Number of iterations
10 %%%% Long side length in millimeters
/border_width { L 0.06 mul }def %%%% Choose the scalefactor for the borders
/L exch 25.4 div 72 mul def %%%% Conversion: mm -> inches -> points
/f{-1 5 sqrt add 2 div}bind def %%%% The reciprocal of the golden ratio
/l{L f mul}bind def %%%% Short side length l = L*f
/Ll{L l add}bind def %%%% Ll = L + l
/c{36 cos L mul}bind def %%%% c = L*cos(36)
/s{36 sin L mul}bind def %%%% s = L*sin(36)
/draw_tile { 0 0 moveto c s lineto 0 lineto gsave closepath gsave fill grestore
0 setlinewidth stroke grestore border_colour stroke } bind def
/half_kite { dup dup 0 gt{ 1 sub gsave f f neg scale -36 rotate half_dart
Ll 0 translate 144 rotate kite grestore }
{ kite_colour L draw_tile }ifelse
pop } bind def
/half_dart { dup dup 0 gt{ 1 sub gsave f f scale half_kite
-144 rotate Ll neg 0 translate half_dart grestore }
{ dart_colour l draw_tile }ifelse
pop } bind def
/kite{ gsave half_kite 1 -1 scale half_kite grestore }bind def
border_width setlinewidth 1 setlinejoin 1 setlinecap
% 450 0 translate
dup f exch neg exp dup scale
5 {kite 72 rotate } repeat stroke
grestore
} def
%
%
/TruchetFill { % on stack: scaling factor
10 dict begin
dup dup scale
1 exch div round /penroseFactor 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
systemdict
/setstrokeadjust known { true setstrokeadjust } if
/ma a neg def
/ha a 2 div def
/mha ha neg def
/tile {
rand dup 2 idiv 2 mul eq { 90 rotate } if
mha mha moveto ha mha lineto
ha ha lineto mha ha lineto
% closepath .1 setlinewidth stroke
contents
} def
/contents{
0 ha moveto ha 0 lineto
0 mha moveto mha 0 lineto
% 1 setlinewidth stroke
} def
/dotiling {
f ma mul a f a mul {
/i exch def
f ma mul a f a mul {
/j exch def
gsave i j translate
tile stroke grestore
} for
} for
} def
%
/f 3 def
5 srand dotiling
end % local user dict
} def
%
/BeginArrow {
ADict begin % hold it local, for end see EndArrow
/@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 % end the ADict
%
/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 % outer or inner dimen
/b ED % the color definition
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 { % holds the coordinates and on top of stack the showpoints boolean
/showpoints ED
counttomark 2 div dup cvi /n ED % n 2 div on stack
n eq not { exch pop } if % even numbers of points? delete one
] aload /Points ED
showpoints not { Points aload pop } if
% { ] aload /Points ED }
% { n 2 mul 1 add -1 roll pop } ifelse % delete the mark symbol
} 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
%
/LineToYAxis {
/Ox ED % Save the x origin value
NArray % all x-y pairs on stack
n { 2 copy moveto % go to current point
Ox exch Lineto % line to y-axis
pop % delete old x-value
} repeat
} def
%
/LineToXAxis{
/Oy ED % Save the y origin value
NArray % all x-y pairs on stack
n 0 eq not
{ n 1 eq { 0 0 /n 2 def } if
ArrowA
/n n 2 sub def
CP 2 copy moveto pop Oy Lineto
n { 2 copy moveto pop Oy Lineto } repeat
CP
4 2 roll
ArrowB
2 copy moveto pop Oy
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
%
/SymbolPolygon { % on stack [ x y x y ...
counttomark % number of elements
2 add /m ED
2 copy m 2 roll % copy last two
m 2 div cvi /n ED % n pairs
/YA ED /XA ED % the start point
n 1 sub {
/YB ED /XB ED
/XLength XB XA sub def
/YLength YB YA sub def
/PAngle YLength XLength Atan def
/XYLength XLength YLength Pyth def
/nSym XYLength SymStep Div cvi def
/Shift Symbol stringwidth pop 2 Div def
/deltaX XLength nSym Div def
/deltaY YLength nSym Div def
XA Shift sub YA Shift sub moveto
nSym {
gsave rotateSymbol { PAngle 180 sub CorrAngle sub rotate } if
Symbol show
grestore
deltaX deltaY rmoveto
} repeat
% XB Shift sub YB Shift sub moveto Symbol show
/YA YB def /XA XB def
} repeat
pop % delete the mark symbol
} 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
%
/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
%
/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
%
/CurvePath {
%% for negative SymStep we calculate the distance
SymStep 0 lt { gsave PathLength SymStep div abs /SymStep ED grestore } if
0.5 setflat
flattenpath /z 0 def /z0 0 def
{ /y1 ED /x1 ED /y2 y1 def /x2 x1 def
x1 Shift sub y1 Shift sub moveto
gsave
curveticks
{ x1 y1 translate startAngle rotate
0 SymbolWidth 2 div moveto 0 SymbolWidth 2 div neg lineto
SymbolLinewidth setlinewidth stroke
}
{ startAngle rotate Symbol show }
ifelse
grestore /z0 z def }
{ /y ED /x ED PathLength@ z z0 sub SymStep ge {
x Shift sub y Shift sub moveto
gsave
curveticks
{ y yOld sub x xOld sub Atan 180 sub CorrAngle sub /rotAngle ED
x y translate rotAngle rotate
0 SymbolWidth 2 div moveto 0 SymbolWidth 2 div neg lineto
SymbolLinewidth setlinewidth stroke
}
{
rotateSymbol { y yOld sub x xOld sub Atan 180 sub CorrAngle sub rotate } if
Symbol show
}
ifelse
grestore /z0 z def } if
/yOld y def /xOld x def }
{} %% the lineto part
{ /y y2 def /x x2 def PathLength@
x Shift sub y Shift sub moveto
gsave
curveticks
{ y yOld sub x xOld sub Atan 180 sub /rotAngle ED
x y translate rotAngle rotate
0 SymbolWidth 2 div moveto 0 SymbolWidth 2 div neg lineto
SymbolLinewidth setlinewidth stroke
}
{
x Shift sub y Shift sub moveto
rotateSymbol { y yOld sub x xOld sub Atan 180 sub CorrAngle sub rotate } if
Symbol show
}
ifelse
grestore
}
pathforall
% curveticks
% { gsave
% x y translate rotAngle rotate
% 0 SymbolWidth 2 div moveto 0 SymbolWidth 2 div neg lineto
% SymbolLinewidth setlinewidth stroke grestore
% } if
z
} def
%
/OpenSymbolCurve {
OpenCurve
0.1 setflat
/Shift Symbol stringwidth pop 2 div def
CurvePath
} 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
%
/AltOpenSymbolCurve {
AltCurve
0.1 setflat
/Shift Symbol stringwidth pop 2 div def
CurvePath
} 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
%
/ClosedSymbolCurve {
ClosedCurve
0.1 setflat
/Shift Symbol stringwidth pop 2 div def
CurvePath
} def
%
/CalcBezierSpline {% Christoph Bersch
10 dict begin
/getX { Points exch 2 mul get } def
/getY { Points exch 2 mul 1 add get } def
/n Points length 1 sub 2 idiv def
/GetFirstControlPoints {
/x n array def
/tmp n array def
/b 2 def
x 0 rhs 0 get b div put
1 1 n 1 sub {
/i exch def
tmp i 1 b div dup 4 1 roll put
i n 1 sub lt { 4 }{ 3.5 } ifelse exch sub /b exch def
x i rhs i get x i 1 sub get sub b div put
} for
1 1 n 1 sub {
n exch sub
dup dup x exch 1 sub 2 copy 6 2 roll
get 3 1 roll tmp exch get
exch x exch get mul sub
put
} for
x
} def
%
n 1 eq {
0 getX 2 mul 1 getX add 3 div
0 getY 2 mul 1 getY add 3 div
exch dup 3 1 roll 2 mul 0 getX sub
exch dup 3 1 roll 2 mul 0 getY sub
[ 0 getX 0 getY 7 3 roll 1 getX 1 getY ] /outPoints exch def
} {
/outPoints 6 n mul 2 add array def
0 1 n {
dup dup 6 mul dup 1 add
outPoints exch 5 -1 roll getY put
outPoints exch 3 -1 roll getX put
} for
/rhs n array def
1 1 n 2 sub {
rhs exch dup dup getX 4 mul exch 1 add getX 2 mul add put
} for
rhs 0 0 getX 1 getX 2 mul add put
rhs n 1 sub dup getX 8 mul n getX add 2 div put
GetFirstControlPoints
1 1 n 2 sub {
rhs exch dup dup getY 4 mul exch 1 add getY 2 mul add put
} for
rhs 0 0 getY 1 getY 2 mul add put
rhs n 1 sub dup getY 8 mul n getY add 2 div put
GetFirstControlPoints
0 1 n 1 sub {
/i exch def
2 copy
i get outPoints 6 i mul 3 add 3 -1 roll put
i get outPoints 6 i mul 2 add 3 -1 roll put
2 copy
i n 1 sub lt {
i 1 add get i 1 add getY 2 mul exch sub outPoints 6 i mul 5 add 3 -1 roll put
i 1 add get i 1 add getX 2 mul exch sub outPoints 6 i mul 4 add 3 -1 roll put
}{
n 1 sub get n getY add 2 div outPoints 6 n 1 sub mul 5 add 3 -1 roll put
n 1 sub get n getX add 2 div outPoints 6 n 1 sub mul 4 add 3 -1 roll put
} ifelse
} for
pop pop
} ifelse
outPoints
end
} def
/Spline {
/showpoints ED
counttomark 2 div dup cvi /n ED
n eq not { exch pop } if
] /Points ED
n 1 gt {
CalcBezierSpline
mark exch aload pop
ArrowA
n 2 sub {
6 2 roll 4 2 roll curveto
} repeat
6 2 roll 4 2 roll ArrowB curveto
} if
} def
/OpenSymbolSpline {
Spline
0.1 setflat
/Shift Symbol stringwidth pop 2 div def
CurvePath
} 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
%
/OpenSymbolBezier {
OpenBezier
0.1 setflat
/Shift Symbol stringwidth pop 2 div def
CurvePath
} 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
%
/ClosedSymbolBezier {
/f ED % save showpoints value
2 copy /yEnd ED /xEnd ED
counttomark -2 roll 2 copy /yStart ED /xStart ED
counttomark 2 roll
f
ClosedBezier
0.1 setflat
/Shift Symbol stringwidth pop 2 div def
CurvePath
[ xEnd yEnd xStart yStart SymbolLine
} 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 ED /x0 ED /y1 ED /x1 ED
/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