diff options
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/trebuchet.mp')
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/trebuchet.mp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/trebuchet.mp b/Master/texmf-dist/doc/metapost/featpost/example/trebuchet.mp new file mode 100644 index 00000000000..bcd0311d59c --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/trebuchet.mp @@ -0,0 +1,32 @@ +% trebuchet.mp +% L. Nobre G. +% 2012 + +prologues := 1; + +beginfig(1); + numeric i, s, a, u, h, t; + pair pi, pj, pk; + u = 9mm; + h = 5u; + a = 0.039u; + s = 5; + draw (0,-h) for i=s-90 step s until 90: + ..(h*(2*cosd(i),sind(i))) + endfor --cycle; + draw origin--(2h,0); + t = 0; + forever: + t := incr(t); + i := h-0.5*a*t**2; + exitif i<-h; + pi := (0,i); + pj := (h+-+i,0); + pk := 2[pi,pj]; + if i<0: + draw pj withpen pencircle scaled 0.17u; + fi; + draw pi--pk withcolor 0.5white; + endfor; +endfig; +end.
\ No newline at end of file |