diff options
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/helix.mp')
-rw-r--r-- | Master/texmf-dist/doc/metapost/featpost/example/helix.mp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/helix.mp b/Master/texmf-dist/doc/metapost/featpost/example/helix.mp new file mode 100644 index 00000000000..bca2e215a85 --- /dev/null +++ b/Master/texmf-dist/doc/metapost/featpost/example/helix.mp @@ -0,0 +1,27 @@ +% helix.mp +% L. Nobre G. +% 2012 + +prologues := 1; + +beginfig(1); + numeric u, w, i, r, s, lim; + u = 2in; + w = 150; + r = 0.5u; + s = 1/20; + lim = 4; + for i=0 step s until lim: + draw fullcircle scaled 2r shifted (u*(i,sind(i*w))); + endfor; + %draw origin--(u*(90/w,1)); + pair d, p; + path slope, decli; + d = (-90/w,3.14159/2); + p = unitvector((-ypart d,xpart d)); + slope = ((-u*d)--(u*d)) shifted (-r*p); + decli = reverse slope shifted (2*r*p); + draw (slope--decli--cycle) shifted (u*180/w,0); +endfig; + +end.
\ No newline at end of file |