summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:45:48 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:45:48 +0000
commit5dc602d16c5be2fd035b254ca23484a90aebd6dc (patch)
tree72efb15fba318cc2096a8cc6999ed3fa0bff317d /Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp
parentb4fc5f639874db951177ec539299d20908adb654 (diff)
doc 5
git-svn-id: svn://tug.org/texlive/trunk@81 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp60
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp
new file mode 100644
index 00000000000..41caf4578a6
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/featpost/example/repeated/nemquira.mp
@@ -0,0 +1,60 @@
+% nemquira.mp
+% L. Nobre G.
+% 2002
+
+%input featpost3Dplus2D;
+
+
+
+beginfig(1);
+ f := 7*(1,2,1);
+ Spread := 70;
+
+ numeric hstep, hmax, hsdev, basestep, basemax, basesdev;
+ numeric i, j, k, angsdev, cylength, cyradius, basen, hn;
+ numeric vcx, vcy, vcz, hcurr, xcurr, ycurr, hbase, aone;
+ numeric atwo, zcurr, angstep, counter;
+ color lenvec, currpos;
+
+ angstep := 20;
+ cylength := 0.45;
+ cyradius := 0.1;
+ basen := 4.5;
+ hn := 1;
+ basestep := cylength*1.37;
+ hstep := basestep;
+ basesdev := basestep*0.05;
+ hsdev := basesdev;
+ hbase := -0.8;
+ angsdev := 4;
+
+ basemax := basen*basestep;
+ hmax := hn*hstep;
+ counter := 0;
+ for i=-basen upto basen:
+ for j=-basen upto basen:
+ hcurr := hbase;
+ forever:
+ exitunless hcurr < hmax+hbase;
+ hcurr := hcurr + hstep;
+ zcurr := hcurr + hsdev*normaldeviate;
+ xcurr := i*basestep + basesdev*normaldeviate;
+ ycurr := j*basestep + basesdev*normaldeviate;
+ aone := angsdev*normaldeviate;
+ atwo := j*angstep + angsdev*normaldeviate;
+ vcz := sind( atwo+90 );
+ vcy := cosd( atwo+90 )*sind( aone );
+ vcx := cosd( atwo+90 )*cosd( aone );
+ currpos := ( xcurr, ycurr, zcurr );
+ lenvec := cylength*( vcx, vcy, vcz );
+% rigorousdisc( 0, true, currpos-0.5*lenvec, cyradius, lenvec);
+ counter := incr(counter);
+ generatedirline( counter, aone, 90+atwo, cylength, currpos );
+ endfor;
+ endfor;
+ endfor;
+ NL := counter;
+ director_invisible( true, 5, false );
+endfig;
+
+end;