
my $n = shift or die "Usage: $0 n\n";
my $radius = .5;
my $pi = atan2(0, -1);

print ".PS\nlinethick=2\n";
my ($prevx, $prevy);
for my $i (0 .. $n) {
  my ($x, $y) = ($radius * cos($i * 2 * $pi / $n),
                 $radius * sin($i * 2 * $pi / $n));
  print "line from ($prevx, $prevy) to ($x, $y)\n"
    if defined $prevx && defined $prevy;
  ($prevx, $prevy) = ($x, $y);
}
print ".PE\n";

