summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/steamcamera.mp
blob: 6fd1d73d47b50df90df466ac45a9cb13f76f668c (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
% steamcamera.mp
% L. Nobre G.
% 2006

input featpost3Dplus2D;

verbatimtex
\documentclass{article} 
\usepackage{palatino,mathpazo} 
\begin{document} 
etex

Spread := 50;
f := (3,5,2);

beginfig(0);
  numeric slabthick, camethick, blocthick, blochange;
  numeric slabside, cameside, blocside;
  color slabpos, camepos, blocpos;
  numeric markmargin;
  color lowonbloc, lowonmark, lowonextr;
  color higonbloc, higonmark, higonextr;
  color newlevelcenter;
  slabthick = 0.07;
  camethick = 0.7;
  blocthick = 0.6;
  slabside = 1.2;
  cameside = 0.9;
  blocside = 0.7;
  blochange = 0.25;
  markmargin = 0.04;
  slabpos = black;
  camepos = -0.5*(slabthick+camethick)*blue;
  blocpos = 0.5*slabthick*blue;
  lowonbloc = blocpos+(0,0.5*blocside,blocthick-blochange);
  higonbloc = blocpos+(0,0.5*blocside,blocthick);
  lowonmark = blocpos+(-0.5*slabside,0.5*blocside,blocthick-blochange);
  higonmark = blocpos+(-0.5*slabside,0.5*blocside,blocthick);
  lowonextr = lowonmark - markmargin*red;
  higonextr = higonmark - markmargin*red;
  kindofcube( false, false, camepos, 0, 0, 0, cameside, cameside, camethick );
  kindofcube( false, false, slabpos, 0, 0, 0, slabside, slabside, slabthick );
  rigorousdisc( 0, true, blocpos, 0.5*blocside, blocthick*blue );
  newlevelcenter = (blocthick-blochange+0.5*slabthick)*blue;
  draw
    spatialhalfcircle( newlevelcenter, blue, 0.5*blocside, true )
    dashed evenly;
  draw rp(lowonbloc)--rp(lowonextr);
  draw rp(higonbloc)--rp(higonextr);
  drawdblarrow rp(lowonmark)--rp(higonmark);
  label.rt( btex $\Delta y$ etex, rp(0.5[lowonmark,higonmark]) );
endfig;

verbatimtex 
\end{document} 
etex

end.