diff options
author | Karl Berry <karl@freefriends.org> | 2023-03-11 21:11:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-03-11 21:11:43 +0000 |
commit | 6bc45f3087df0ce19bdf3c57a0aec55944ec40ed (patch) | |
tree | 3faac3b12b92fc4ba09b62c0472a9b3654dada6a /Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 | |
parent | 86d58778de06c53c2e0b20f25556b96619a2dc42 (diff) |
circuit-macros (11mar23)%
git-svn-id: svn://tug.org/texlive/trunk@66549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 new file mode 100644 index 00000000000..f14973204f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4 @@ -0,0 +1,19 @@ +.PS +# RandomNodes.m4 +gen_init +NeedDpicTools + + scale = 2.54 + n = 300 + msiz = 4.90*2 + maxdist = 1.0 + + box wid msiz ht msiz with .sw at (0,0) + for i=1 to n do { X[i] : (rand(), rand())*msiz } + for i=1 to n-1 do { for j=i+1 to n do { + if distance(X[i],X[j]) <= maxdist then { + line outlined "green" from X[i] to X[j] + } } } + for i=1 to n do { circle rad dotrad_ at X[i] shaded "green" } + +.PE |