Rotation Example

Try it.

%!
% Example of rotation... draws 36 lines in a circular pattern

0 10 360 {              % Go from 0 to 360 degrees in 10 degree steps
  newpath               % Start a new path

  gsave                 % Keep rotations temporary
    144 144 moveto
    rotate              % Rotate by degrees on stack from 'for'
    72 0 rlineto
    stroke
  grestore              % Get back the unrotated state

} for                   % Iterate over angles

showpage