Debian Codegraph @

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

raw
1 % cruztuga.mp
2 % L. Nobre G.
3 % 2007
4
5 prologues := 1;
6
7 beginfig(1);
8 numeric u, da, db;
9 u = 1cm;
10 da = 1-1/sqrt(2);
11 db = 3/sqrt(2)-2;
12 z1 = u*(1.5,0.5);
13 z2 = u*(1.5,2.5-da);
14 z3 = u*(3.5+da,4.5);
15 z4 = u*(-3.5-da,4.5);
16 z5 = u*(db-1.5,3.5);
17 z6 = u*(1.5-db,3.5);
18 z7 = u*(0.5,2.5+db);
19 z8 = 0.5u*(1,1);
20 z10= 6u*(1,1);
21 z11= 6u*(-1,1);
22 z12= 6u*(-1,-1);
23 z13= 6u*(1,-1);
24 path octave;
25 picture tmppic;
26 octave = z1--z2--z3--z4--z5--z6--z7--z8--cycle;
27 fill octave withcolor red;
28 draw currentpicture xscaled -1;
29 draw currentpicture rotated 90;
30 draw currentpicture rotated 180;
31 tmppic = currentpicture;
32 currentpicture := nullpicture;
33 fill z10--z11--z12--z13--cycle;
34 draw tmppic;
35 endfig;
36
37 end.