File: snake.m4

package info (click to toggle)
texlive-base 2020.20210202-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 791,092 kB
  • sloc: perl: 45,038; sh: 4,926; makefile: 4,655; ansic: 2,266; ruby: 2,231; tcl: 2,156; xml: 1,874; python: 822; cpp: 695; awk: 606; lisp: 199; sed: 8
file content (21 lines) | stat: -rw-r--r-- 370 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
21
.PS
# snake.m4
gen_init
scale = 2
rmax = 0.8
rmin = 0.2
fact = 0.75
wd = 0.15
[
shade(0.8,
  for r = rmax to rmin by *fact do {
  arc cw  rad r to Here+(r+r,0)
  arc ccw rad r-wd to Here+(2*(r-wd),0) }
  line right wd
  for r = r to rmax by *1/fact do {
  arc cw  rad r to Here-(r+r,0)
  arc ccw rad r-wd to Here-(2*(r-wd),0) }
  line to (0,0)
  )
] with .sw at 2,2
.PE