Debian Codegraph @

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

raw
1 % potenciadecicloeliptico.mp
2 % L. Nobre G.
3 % 2008
4
5 verbatimtex
6 \documentclass{article}
7 \usepackage{palatino,concmath,ccfonts}
8 \begin{document}
9 etex
10
11 beginfig(1);
12 numeric u,w,h;
13 u = 5mm;
14 w = 11u;
15 h = 6u;
16 drawarrow origin--(0,h);
17 drawarrow origin--(w,0);
18 label.lft( btex $p$ etex, (0,h) );
19 label.bot( btex $V$ etex, (w,0) );
20 numeric wm, hm, tl;
21 tl = 0.05*h;
22 wm = 0.1+uniformdeviate(0.07);
23 hm = 0.1+uniformdeviate(0.07);
24 path elipse;
25 elipse = fullcircle xscaled (w-2*w*wm) yscaled (h-2*h*hm)
26 shifted (w/2,h/2);
27 draw elipse;
28 z1 = (w*wm,0);
29 z3 = (w*(1-wm),0);
30 z2 = (0,h*(1-hm));
31 z4 = (0,h*hm);
32 draw z1--(z1+tl*up);
33 draw z3--(z3+tl*up);
34 draw z2--(z2+tl*right);
35 draw z4--(z4+tl*right);
36 label.lft( btex $p_b$ etex, z2 );
37 label.bot( btex $V_a$ etex, z1 );
38 label.lft( btex $p_d$ etex, z4 );
39 label.bot( btex $V_c$ etex, z3 );
40 endfig;
41
42 verbatimtex
43 \end{document}
44 etex
45
46 end.