Debian Codegraph @

texmf-dist/doc/metapost/featpost/example/ropepatterns.mp

raw
1 % ropepatterns.mp
2 % L. Nobre G.
3 % 2011
4
5 input featpost3Dplus2D;
6
7 prologues := 2;
8
9 RopeColors := TableColors;
10
11 beginfig(1);
12 numeric i, u;
13 u = 1cm;
14 path auxpath, ropath;
15 pair auxpair;
16 for i=0 upto TableColors:
17 RopeColorSeq[i] := i;
18 auxpair := u*(i,TableColors);
19 auxpath := fullcircle scaled u shifted auxpair;
20 fill auxpath withcolor TableC[i];
21 draw auxpath;
22 label( decimal(i), auxpair );
23 endfor;
24 ropath = origin...(u*(0.5*TableColors,TableColors-2))...(u*TableColors*(1,0));
25 ropepattern(ropath, u, 10);
26 RopeColors := floor(0.5*TableColors);
27 ropepattern(ropath yscaled (-1) shifted (u*up*(TableColors-2)), u, 7);
28 endfig;
29
30 end.