summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/RandomNodes.m4
diff options
context:
space:
mode:
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.m419
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