%! % --- procedure --------------------------------------------- % argument: s % returns an array of points in a square s on a side, centered at (0,0) /square { 1 dict begin /s exch def [ [ s -0.5 mul dup ] [ s 0.5 mul dup neg ] [ s 0.5 mul dup ] [ s -0.5 mul dup neg ] ] end } def % --- sample usage ------------------------------------------- /S 72 def S dup scale 1 S div setlinewidth 4.25 5.5 translate newpath /s 2 square def /c s 3 get def c 0 get c 1 get moveto 0 1 s length 1 sub { /i exch def /c s i get def c 0 get c 1 get lineto } for closepath stroke