File: Wheat.m4

package info (click to toggle)
circuit-macros 9.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,112 kB
  • sloc: makefile: 728; sh: 55
file content (20 lines) | stat: -rw-r--r-- 442 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.PS
# `Wheat.m4'
gen_init

boxwid = boxht

for j = 0 to 7 do {
  for i = 0 to 7 do {
    box fill_((i+j)%2) at (j*boxwid,-i*boxwid)
    x = 2^(j+8*i)
    if (i+j)%2==0 then { command "{\white" } else { command "{\black" }
    if x < 10000 then { sprintf("\Large$%g$",x) at last box } \
    else { y = int(log(x))
           sprintf("{\Large$%g$}$\cdot 10^{%g}$",round_(x/(10^y)),y) \
             at last box }
    command "}"
    }
  }

.PE