summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/Wheat.m4
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/circuit_macros/examples/Wheat.m4
Initial commit
Diffstat (limited to 'graphics/circuit_macros/examples/Wheat.m4')
-rw-r--r--graphics/circuit_macros/examples/Wheat.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/graphics/circuit_macros/examples/Wheat.m4 b/graphics/circuit_macros/examples/Wheat.m4
new file mode 100644
index 0000000000..a797c81e96
--- /dev/null
+++ b/graphics/circuit_macros/examples/Wheat.m4
@@ -0,0 +1,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