Debian Codegraph @

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

raw
1 % lasermachine.mp
2 % L. Nobre G.
3 % 2006
4
5 input featpost3Dplus2D;
6
7 prologues := 1;
8
9 beginfig(1);
10 numeric devi;
11 devi = 0.1;
12 path hart, it;
13 numeric u, abot, atop, delta, i;
14 u = 1in;
15 abot = 60;
16 atop = 145;
17 delta = 23;
18 z1 = ( 0, 2u);
19 z2 = ( -1u, 1.25u );
20 z3 = ( 1u, 1.25u );
21 hart = origin{dir(abot-delta)}
22 ...z3...{dir(-atop)}z1{dir(atop)}
23 ...z2...{dir(-abot)}cycle;
24 it = hart yscaled 0.85;
25 for i=2 downto -3:
26 draw lasermachine( it, devi*u*i, 0.95 ) withcolor uniformdeviate(1)*red;
27 endfor;
28 endfig;
29 end.