summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/lasermachine.mp
blob: eb9c18fd5d4ced4667ad85a21f22c85b0664ead3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% lasermachine.mp
% L. Nobre G.
% 2006

input featpost3Dplus2D;

beginfig(1);
  numeric devi;
  devi = 0.1;
  path hart, it;
  numeric u, abot, atop, delta, i;
  u = 1in;
  abot = 60;
  atop = 145;
  delta = 23;
  z1 = ( 0, 2u);
  z2 = ( -1u, 1.25u );
  z3 = (  1u, 1.25u );
  hart = origin{dir(abot-delta)}
      ...z3...{dir(-atop)}z1{dir(atop)}
      ...z2...{dir(-abot)}cycle;
  it = hart yscaled 0.85;
  for i=4 downto -6: 
    fill lasermachine( it, devi*u*i, 0.3 ) withcolor uniformdeviate(1)*red;
  endfor;  
endfig;
end.