diff options
author | Karl Berry <karl@freefriends.org> | 2013-08-04 23:27:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-08-04 23:27:56 +0000 |
commit | 45685e2c30714eae1fb1e722a26ca3d24b2f679e (patch) | |
tree | 34e73fd5f0b271a853a975e9b0afb91a1daf0715 /Master/texmf-dist/doc/metapost/featpost/example/iplaca.mp | |
parent | e2b5fb5b3af29ba822d3c923b88353508331b8e7 (diff) |
featpost
git-svn-id: svn://tug.org/texlive/trunk@31346 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/iplaca.mp')
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/iplaca.mp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/iplaca.mp b/Master/texmf-dist/doc/metapost/featpost/example/iplaca.mp new file mode 100644 index 00000000000..1b8148d0115 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/iplaca.mp @@ -0,0 +1,45 @@ +% iplaca.mp +% L. Nobre G. +% 2012 + +prologues := 1; + +numeric u; +u = 52mm; + +def placaminho( expr yv ) = + begingroup + pair p[]; + numeric xh; + xh = u-yv; + p1 = (xh,yv); + p2 = (-xh,yv); + p3 = (-xh,-yv); + p4 = (0,-yv); + p5 = (-yv,0); + p6 = (0,yv); + p7 = (yv,0); + p8 = (xh,-yv); + ( p1--p2--p3--p4--p5--p6--p7--p4--p8--cycle ) + endgroup +enddef; + +beginfig(1); + path a, b, c; + color g; + pen j; + j = pencircle scaled 0.02u; + g = 0.5white; + a = placaminho( 0.15u ) shifted (left*u*1.9); + fill a withcolor g; + draw a withpen j; + b = placaminho( 0.3u ); + fill b withcolor g; + draw b withpen j; + c = placaminho( 0.45u ) shifted (right*u*1.7); + fill c withcolor g; + draw c withpen j; +endfig; + +end. +
\ No newline at end of file |