'Returns a list of LineSegment objects.'

def segments(self):

    segs = []
    for (i, point) in enumerate(self.points[1:]):
        index = (i + 1)
        segs.append(LineSegment(Vector2(self.points[(index - 1)][0], self.points[(index - 1)][1]), Vector2(self.points[index][0], self.points[index][1])))
    segs.append(LineSegment(Vector2(self.points[(-1)][0], self.points[(-1)][1]), Vector2(self.points[0][0], self.points[0][1])))
    return segs
