% diamond.m4 .PS # See LaTeX Graphics Companion pp 57-58 dimen = 1.5 ratio = 0.9 n = 30 North: (0,dimen) East: (dimen,0) South: (0,-dimen) West: (-dimen,0) define(`diamond',` ifdef(`pstricks_', `\pscustom[linecolor=white,linewidth=0pt,fillstyle=solid,fillcolor=`$1']{', `shade(ifelse(`$1',white,0,1),') line from North to East then to South then to West then to North ifdef(`pstricks_',`\relax}',`)') ') for i = 2 to n do { if (i % 2) == 0 then { diamond(black) } else { diamond(white) } 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 } .PE