summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-graphics-companion/12-0-2.mp
blob: 4eaaf5bed34bb052c5277c76b04ebafd201cb038 (plain)
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
input boxes
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
defaultfont:="ptmb8r";
vardef labelarrow
 (suffix BoxA,BoxB) expr Line =
  drawarrow Line
  cutbefore bpath BoxA
  cutafter bpath BoxB;
  point (.5*length Line) of Line
enddef;
color yellow,orange;
yellow:=red+green;
orange:=red+(green/2);
boxjoin(a.n=b.s-(0,.3in));
defaultscale:=1.2;
circmargin:=4pt;
circleit.In("in");
circleit.One("1"); circleit.Two("2");
circleit.Three("3"); circleit.Four("4");
boxjoin(); circmargin:=16pt;circleit.X("");X.c=Four.c;
drawunboxed(One,Two,Three,Four,In,X);
drawarrow In.n--One.s;
label.rt("a",
  labelarrow(One,Two) One.c--Two.c)
  withcolor red;
label.rt("b",
  labelarrow(Two,Three) Two.c--Three.c)
  withcolor green;
label.rt("b",
  labelarrow(Three,Four) Three.c--Four.c)
  withcolor green;
label.rt("a",
  labelarrow(Four,Two) Four.c{dir335}..
  {dir205}Two.c)  withcolor red;
label.lft("a",
  labelarrow(Three,Two) Three.c{dir205}..
  {dir335}Two.c)  withcolor red;
label.lft("b",
  labelarrow(Four,One) Four.c{dir180}..
  tension2..One.c)   withcolor green;
label.rt("b",
  labelarrow(One,One) One.c{dir45}..One.c+(40,0)..
  {dir120}One.c)   withcolor green;
label.rt("a",
  labelarrow(Two,Two) Two.c{dir65}..Two.c+(40,0)..
  {dir100}Two.c)  withcolor red;
fill bpath One withcolor blue;
draw pic One withcolor white;
fill bpath Two withcolor yellow;
draw pic Two;
fill bpath Three withcolor orange;
draw pic Three withcolor white;
draw bpath Four ;
pickup pencircle scaled 2pt;
draw bpath X dashed evenly withcolor (1 , .75, .8);
endfig;
end;