%! 72 dup scale 1 72 div setlinewidth 1 1 translate /s 0.5 def % g s = arguments to this procedure % g entered first, s second /fill-square { % the color shade g and the side s now sit on the stack 1 dict begin % define s (local) to be the top value on the stack /s exch def % define g (local) to be the value now on the top of the stack /g exch def newpath 0 0 moveto s 0 lineto s s lineto 0 s lineto closepath gsave g 0 0 setrgbcolor fill grestore stroke end } def /g 1 def gsave 10 { g 1 fill-square newpath 0 0 0.25 0 360 arc gsave g 0 0 setrgbcolor fill grestore stroke 0.25 0.25 translate /g g 0.1 sub def } repeat grestore showpage