summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/diamondDPV.m4
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/diamondDPV.m4')
-rw-r--r--Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/diamondDPV.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/diamondDPV.m4 b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/diamondDPV.m4
new file mode 100644
index 00000000000..3c5e0f5bfea
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/circuit-macros/examples/dpv/diamondDPV.m4
@@ -0,0 +1,34 @@
+.PS
+# diamond.m4
+# See LaTeX Graphics Companion pp 57-58
+gen_init
+dimen = 1.5*scale
+ratio = 0.9
+n = 30
+
+North: (0,dimen)
+East: (dimen,0)
+South: (0,-dimen)
+West: (-dimen,0)
+
+define(`square',
+ `shade(`$1',
+ line from North to East then to South then to West then to North)
+ ')
+
+define(`diamond',`[
+for i = 2 to n do {
+ square(`$1')
+ Tmp: North
+ North: ratio between East and North
+ East: ratio between South and East
+ South: ratio between West and South
+ West: ratio between Tmp and West
+ }]')
+
+linethick = 0
+diamond( i % 2 )
+linethick = 0.4
+diamond( (n-i)/(n-2) ) with .w at last [].e+(0.25,0)
+
+.PE