summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp76
1 files changed, 76 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp b/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp
new file mode 100644
index 00000000000..c585a52cc43
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/balllauncher.mp
@@ -0,0 +1,76 @@
+% balllauncher.mp
+% L. Nobre G.
+% 2007
+
+prologues := 1;
+
+beginfig(1);
+ numeric tlen, thig, plen, phig, llen, lhig, pray, sray, wray, lray;
+ numeric u, gmar, lang, hlen, rlen, pmal, pmah, aray, alim, aste, alen;
+ pen basepen, outerpen;
+ picture mydash;
+ u = 2.5mm;
+ basepen = pencircle scaled 0.35u;
+ outerpen = pencircle scaled 1.1u;
+ mydash = dashpattern( off 1.5u on 1.2u off 1.5u);
+ pickup basepen;
+ gmar = 0.65u; % margem de bordadura
+ lang = 35; % angulo do lancador
+ hlen = 70u; % comprimento da linha horizontal
+ tlen = 80u; % comprimento da tabua
+ thig = 6u; % altura da tabua
+ plen = 60u; % comprimento da placa
+ phig = 35u; % altura da placa
+ pmal = 20u; % parte da placa que fica em cima da tabua
+ pmah = 15u; % parte da placa que fica abaixo da horizontal
+ llen = 60u; % comprimento da lancador (na inclinacao zero)
+ lhig = 12u; % altura do lancador (na inclinacao zero)
+ pray = 2u; % raio dos cantos arredondados da placa
+ sray = 2.7u; % raio da marca da esfera no lancador
+ wray = 1u; % raio do peso de marcacao do angulo
+ lray = 3u; % raio da ponta do gatilho do lancador
+ rlen = 20u; % comprimento da cordinha que segura o peso de marcacao
+ alim = 45; % angulo limite do tansferidor
+ aste = 5; % divisao da escala do transferidor
+ alen = 0.9u; % comprimento das marcas da escala do transferidor
+ aray = lhig-4*gmar; % raio do transferidor
+ path t, p, a, lo, li, sp;
+ li = (aray+3*gmar-llen,-gmar)--(aray+gmar,-gmar)--
+ (aray+gmar,lhig-3*gmar)--(aray+3*gmar-llen,lhig-3*gmar)--cycle;
+ lo = (aray+2*gmar-llen,-2*gmar)--(aray+2*gmar,-2*gmar)--
+ (aray+2*gmar,lhig-2*gmar)--(aray+2*gmar-llen,lhig-2*gmar)--cycle;
+ t = origin--(tlen,0)--(tlen,-thig)--(0,-thig)--cycle;
+ p = origin--(pmal,0)---(pmal,phig-pmah-pray)...(pmal-pray,phig-pmah)---
+ (pmal-plen+pray,phig-pmah)...(pmal-plen,phig-pmah-pray)---
+ (pmal-plen,pray-pmah)...(pmal-plen+pray,-pmah)---
+ (-pray,-pmah)...(0,pray-pmah)---cycle;
+ a = buildcycle( fullcircle rotated (-10), dir(90+alim)--origin--right );
+ numeric auxa, auxb, aucc;
+ auxa = aray+5*gmar-llen+sray;
+ auxb = 0.5*lhig-2*gmar;
+ z0 = (auxa,auxb);
+ sp = fullcircle scaled (2*sray) shifted z0;
+ unfill lo;
+ draw lo;
+ fill li;
+ unfill sp;
+ unfill a scaled (2*aray);
+ numeric i;
+ for i=aste step aste until alim-aste+90:
+ draw (aray-gmar)*dir(i)--(aray-gmar-alen)*dir(i);
+ endfor;
+ z1 = rlen*dir(90-lang);
+ draw origin--z1;
+ fill fullcircle scaled (2*wray) shifted z1;
+ picture tmppicture;
+ tmppicture = currentpicture;
+ currentpicture := nullpicture;
+ draw t;
+ fill p;
+ draw tmppicture rotatedaround (z0,180+lang)
+ shifted ((-0.5*(plen-pmal),sray)-z0);
+ undraw origin--(-hlen,0) dashed mydash withpen outerpen;
+ draw origin--(-hlen,0) dashed mydash withpen basepen;
+endfig;
+
+end. \ No newline at end of file