Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/extras/Wheel.m4

raw
1 .PS
2 # Wheel.m4
3 # https://tex.stackexchange.com/questions/605178/drawing-a-directed-wheel-graph-with-tikz
4 gen_init
5
6 linethick = 1.6
7 nnodes = 9
8 brad = 2
9 srad = circlerad/2
10 P: circle rad srad at (1,0.5) fill_(0.75)
11 A: Rect_(brad,90+360/nnodes)
12 for i=1 to nnodes do {
13 B: circle invis shaded "lightgray" at Rect_(brad,90-(i-1)/nnodes*360) \
14 sprintf("\Huge %g",i)
15 line from B to P chop circlerad chop srad
16 line from B to A chop
17 A: B
18 }
19
20 .PE