The variable n is the number of sides in your polygon, while theta is the angle of rotation. If you make the fraction greater than 1/(2n), you’re rotating past the midpoint of the first side and you could get an equivalent picture with a smaller angle of rotation.
I've also introduced color, just for fun. The code is below, and I've included a few of my favorites. The color is controlled through the redscale, bluescale and greenscale variables, together with the redfunct, greenfunct, and bluefunct functions.