File: Wheel.m4

package info (click to toggle)
circuit-macros 10.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 6,532 kB
  • sloc: makefile: 909; sh: 49
file content (20 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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