summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4
new file mode 100644
index 00000000000..934c4c46dbd
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4
@@ -0,0 +1,20 @@
+.PS
+# Wheel.m4
+# https://tex.stackexchange.com/questions/605178/drawing-a-directed-wheel-graph-with-tikz
+gen_init
+
+ linethick = 1.6
+ nnodes = 9
+ brad = 2
+ srad = circlerad/2
+ P: circle rad srad at (1,0.5) fill_(0.75)
+ A: Rect_(brad,90+360/nnodes)
+ for i=1 to nnodes do {
+ B: circle invis shaded "lightgray" at Rect_(brad,90-(i-1)/nnodes*360) \
+ sprintf("\Huge %g",i)
+ line from B to P chop circlerad chop srad
+ line from B to A chop
+ A: B
+ }
+
+.PE