diff options
author | Karl Berry <karl@freefriends.org> | 2012-04-16 22:46:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-04-16 22:46:29 +0000 |
commit | 76e16dc8afcc19ccbb1cc66be529411dfe41ce6e (patch) | |
tree | 5e79f4db9f36c7e53887264b98bf3b33d41daa5f /Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp | |
parent | 9d51929278483d4f1cbfe10dee38085f3ca4811c (diff) |
featpost (16apr12)
git-svn-id: svn://tug.org/texlive/trunk@25991 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp')
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp b/Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp new file mode 100644 index 00000000000..2d596680b29 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/casadopessoal.mp @@ -0,0 +1,53 @@ +% casadopessoal.mp +% L. Nobre G. +% 2011 + +prologues := 1; + +numeric u, raio, cc, cp, espa, cpc; +u = 50mm; +raio = 0.4u; +espa = u-2*raio; +cpc = u; +cc = 2.16u; +cp =1.6u; + +color pgreen, cblue; +pgreen = (139,194,52)/255; +cblue = (12,84,130)/255; +picture C, P; + +def boxpath( expr w, h, r ) = + ((w,0)---(w,h-r)...(w-r,h)---(r-w,h)...(-w,h-r)---(-w,r-h)...(r-w,-h)---(w-r,-h)...(w,r-h)---cycle) +enddef; + +def boxdraw( expr W, H, R, coox, cooy, col ) = + fill boxpath( W/2, H/2, R ) shifted (coox,cooy) withcolor col +enddef; + +beginfig(2); + numeric altur; + altur = 2*(cp+espa)+raio; + boxdraw(u,cp,raio,-0.5*(cc+espa),0.5*(cp-altur),pgreen); + boxdraw(cc,u,raio,0,cp+0.5*(espa-altur),pgreen); + boxdraw(u,cp,raio,-0.5*(cc+espa),0.5*(altur-cp)-espa-raio,pgreen); + boxdraw(cc,u,raio,0,0.5*(altur-u),pgreen); + boxdraw(u,cp,raio,0.5*(cc+espa),0.5*(altur-cp)-espa-raio,pgreen); + P = currentpicture; +endfig; + +beginfig(1); + boxdraw(u,altur-2*(raio+espa),raio,-0.5*(cc+espa),0,cblue); + boxdraw(cc,u,raio,0,0.5*(u-altur),cblue); + boxdraw(u,cpc,raio,0.5*(cc+espa),0.5*(altur-cpc)-espa-raio,cblue); + boxdraw(cc,u,raio,0,0.5*(altur-u),cblue); + boxdraw(u,cpc,raio,0.5*(cc+espa),0.5*(cpc-altur)+espa+raio,cblue); + C = currentpicture; +endfig; + +beginfig(3); + draw C shifted (-raio-0.5*(cc+3*espa),0); + draw P shifted (raio+0.5*(cc+3*espa),0); +endfig; + +end.
\ No newline at end of file |