r = 3
Z = RandomUniform(0, 6.28319)
n = 20 (slider from 2 to 50, step 1)
L1 = Sequence((1 / n * k), k, 0, n)
K1 = Sequence((Element[L1, k] + Element[L1, k + 1]) / 2, k, 1, n)
K2 = Append(Element[L1, 1] / 2, K1)
K3 = Sequence(((Element[K2, k] * 2) * π), k, 1, n + 1)
W = Sequence(((Element[L1, k] * 2) * π), k, 1, n + 1)
P = Sequence(((r * cos(Z + Element[W, m])), (r * sin(Z + Element[W, m]))), m, 1, n)
c = Circle((0, 0), r)
P2 = Append(P, ((r * cos(Z)), (r * sin(Z))))
K4 = Sequence((((r * 0.78) * cos(Z + Element[K3, m])), (-0.1) + ((r * 0.78) * sin(Z + Element[K3, m]))), m, 1, n + 1)
L2 = Sequence(Segment[(0, 0), Element[P2, k]], k, 1, n + 1)
R, R_2, R_3, R_4, R_5 = Polygon((0, 3), (0.2, 3.4), (-0.2, 3.4), (0, 3))
B = Sequence(Text[m - 1, Element[K4, m]], m, 2, n + 1)
Text1 = Text("Drehen mit f9")