rotation and reflection plot functions from Federico:
Half rotation (180º) of $S_n(s)$: $x=s, y=1-S_n(s)$
def getHalfRotatedPoints(n, density):
p = SpreadPoly(n)
i = Fraction(1, density)
k = Fraction(-1,density)
x, y = [], []
for j in range(density+1):
k += i
x.append(k)
y.append(1-PolyEval(p, k))
return x, y
Right rotation (90º left) of $S_n(s)$: $x = S_n(s), y=s$
def getRightRotatedPoints(n, density):
p = SpreadPoly(n)
i = Fraction(1, density)
k = Fraction(-1,density)
x, y = [], []
for j in range(density+1):
k += i
x.append(PolyEval(p, k))
y.append(k)
return x, y
Left rotation (90º right) of $S_n(s)$: $x = 1 - S_n(s), y=s$
def getLeftRotatedPoints(n, density):
p = SpreadPoly(n)
i = Fraction(1, density)
k = Fraction(-1,density)
x, y = [], []
for j in range(density+1):
k += i
x.append(1-PolyEval(p, k))
y.append(k)
return x, y
rotation and reflection plot functions from Federico:
Right rotation (90º left) of $S_n(s)$: $x = S_n(s), y=s$
Left rotation (90º right) of $S_n(s)$: $x = 1 - S_n(s), y=s$
Originally posted by @rfede in https://github.com/geometor/polynumbers/discussions/1#discussioncomment-3057320