1的n次方根
Author: 藍邦偉　老師

1的n次方根

c = Circle((0.0, 0.0), 1.0)
n = 12 (slider from 2 to 12, step 1)
list1 = Sequence((cos(2.0 * i * 3.141592653589793 / n), sin(2.0 * i * 3.141592653589793 / n)), i, 0.0, n - 1.0)
list3 = Sequence((1.1 * cos(2.0 * i * 3.141592653589793 / n), 1.1 * sin(2.0 * i * 3.141592653589793 / n)), i, 0.0, n - 1.0)
多邊形1 = Polygon(Element[list1, 1.0], Element[list1, 2.0], n)
list4 = Sequence(Segment[(0.0, 0.0), (cos(2.0 * i * 3.141592653589793 / n), sin(2.0 * i * 3.141592653589793 / n))], i, 0.0, n - 1.0)
k = 4 (slider from 1 to 24, step 1)
a = Mod(k, n)
P = If(a ≠ 0.0, Element[list1, a], Element[list1, n])
Q = If(a ≠ 0.0, Element[list1, a + 1.0], Element[list1, 1.0])
α = Angle(P, (0.0, 0.0), Q)
b = Segment((0.0, 0.0), (cos(2.0 * k * 3.141592653589793 / n), sin(2.0 * k * 3.141592653589793 / n)))
文字1: "z^" + n + "=1"
A_1: (x(Corner[1.0]), 0.0)
A_2: (x(Corner[3.0]), 0.0)
u = Vector(A_1, A_2)
A_3: (0.0, y(Corner[1.0]))
A_4: (0.0, y(Corner[3.0]))
v = Vector(A_3, A_4)
文字3 = Text("x", A_2 + (-(0.1), 0.1))
文字4 = Text("y", A_4 + (0.1, -(0.1)))
list2 = Sequence(Text["ω_{" + (i - 1.0) + "}", Element[list3, i]], i, 1.0, n)
文字2 = Text("ω_{" + k + "}", (0.9 * cos(2.0 * k * 3.141592653589793 / n), 0.9 * sin(2.0 * k * 3.141592653589793 / n)))
d: k ≤ n