import math


def getregpoly(sides):
     """ Get points for a unit regular-polygon with n sides. """
     points = []
     ang = 2*math.pi / sides
     for i in range(sides):
         deg = (i+.5)*ang
         points.append(math.sin(deg)/2.0+.5)
         points.append(math.cos(deg)/2.0+.5)
     return points