%!PS-Adobe-2.0
/n 6 def
/a 360 n div def
/b a 2 div def
/r 100 def

/tanb b sin b cos div def
/x r 1 tanb sub div def
/y x tanb mul def
/s 2 sqrt y mul def
/t y b sin div def

/square {
newpath
  r 0 moveto
  x y lineto
  x y add 0 lineto
  x y neg lineto
  closepath fill
} def

/rest {
1 0 0 0 setcmykcolor % cyan
% axes
0.7 setlinewidth
-20 0 moveto
r 4 mul 30 add 0 lineto stroke
0 r neg moveto
0 r 2 mul lineto stroke

% key stuff
3 setlinewidth
0 0 moveto
x 0 lineto stroke
0 0 moveto
x y lineto stroke
r 0 moveto
x y lineto stroke
x 0 moveto
x y lineto stroke

% rest
0.7 setlinewidth
x y add 0 moveto
x y lineto stroke
0 0 moveto
x y neg lineto stroke
r 0 moveto
x y neg lineto stroke
x 0 moveto
x y neg lineto stroke
x y neg moveto
x y add 0 lineto stroke
} def % rest


100 200 translate
square
rest

showpage