#!/usr/bin/env python
import matplotlib.pyplot as plt
from math import *

def p(k,n):
   return(((k-2)*n*(n+1))/2 -(k-3)*n)

k=13

polygonal_nums = [p(k,n) for n in range(100)]
theta = [2*pi*sqrt(n) for n in polygonal_nums]
r = [sqrt(n) for n in polygonal_nums]

myplot = plt.polar(theta,r,'.-')
plt.gca().axis('off')
plt.show()


