#!/usr/bin/env python
import math
def fibomod(n):
values = [0, 1]
while not ( values[-2] == 1 and values[-1] == 0):
x = (values[-1] + values[-2]) % n
values.append(x)
return values[:-1]
def fibopoint(cx, cy, r, p, n):
theta = 2 * math.pi * p / n
return ( cx + r * math.sin(theta), cy - r * math.cos(theta) )
def fibopoly(cx, cy, r, n):
return [ fibopoint(cx, cy, r, p, n) for p in fibomod(n) ]
def svgpoly(points):
ps = " ".join([ f"{x},{y}" for (x, y) in points ])
return f''
def svgline(p1, p2):
return f'\n'
def svglines(points):
lines = ""
for i in range(1, len(points)):
p2 = points[i]
p1 = points[i - 1]
lines += svgline(p1, p2)
lines += svgline(points[-1], points[0])
return lines
print('')