Debian Codegraph @

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

raw
1 % twoholes.mp
2 % L. Nobre G.
3 % 2004
4
5 input featpost3Dplus2D;
6
7 f := 1.5*(0,1.5,1);
8 Spread := 100;
9
10 beginfig(1);
11 numeric stagelevel, holediam, outerdiam, stagemargin;
12 numeric numberofstagesidesquares, stagesidesize;
13 numeric centercoord;
14 color centerposdisc, centerpostorus;
15 stagelevel = 0.2;
16 holediam = 0.6;
17 stagemargin = 0.2;
18 numberofstagesidesquares = 20;
19 outerdiam = holediam+4*stagelevel;
20 stagesidesize = 2*( outerdiam + stagemargin );
21 centercoord = 0.3535*outerdiam;
22 HoriZon := -stagelevel;
23 centerpostorus = ( centercoord, -centercoord, 0 );
24 centerposdisc = ( -centercoord, centercoord, HoriZon );
25 setthestage( numberofstagesidesquares, stagesidesize );
26 smoothtorus( centerpostorus, blue,
27 0.5*holediam+stagelevel, stagelevel );
28 rigorousdisc( 0.5*holediam, true, centerposdisc,
29 0.5*outerdiam, 1.5*stagelevel*blue );
30 endfig;
31 end.