Debian Codegraph @

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

raw
1 % cylimple.mp
2 % L. Nobre G.
3 % 2002
4
5 input featpost3Dplus2D;
6
7 SphericalDistortion := true;
8 f := 0.3*(5,4,2);
9 Spread := 40;
10 ShiftV := (200,200);
11
12 %SphericalDistortion := false;
13 %f := 3.3*(5,4,2);
14 %Spread := 70;
15 %Shifts := (250,250);
16
17 beginfig(1);
18 color orig, axxc, ayyc, azzc;
19 color nalfa, gammacnt, vertex;
20 numeric altura, grids, radius, xxsize, aux,
21 yysize, zzsize, i, numc, slope;
22
23 altura = 1;
24 radius = 0.3;
25 grids = 1;
26 numc = 9;
27 slope = 3;
28
29 for i=1 upto numc:
30 aux := (i-1-0.5*(numc-1))*grids;
31 gammacnt := (0,aux,0);
32 vertex := (aux/slope,aux,altura);
33 nalfa := vertex - gammacnt;
34 rigorousdisc( 0, true, gammacnt, radius, nalfa );
35 endfor;
36 xxsize = radius;
37 yysize = 0.5*(numc-1)*grids;
38 zzsize = altura;
39 orig = (0,0,0);
40 axxc = (xxsize,0,0);
41 ayyc = (0,yysize,0);
42 azzc = (0,0,zzsize);
43 % drawarrow rp(orig)..rp(axxc);
44 % drawarrow rp(orig)..rp(ayyc);
45 % drawarrow rp(orig)..rp(azzc);
46 endfig;
47
48 end;
49
50