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

$ 1的\;n\;次方根 $

$ =cos0°+isin0° $

$ =cos2kπ+isin2kπ,k∈\mathbb{Z} $

c = Circle((0, 0), 1)
n = 7 (slider from 2 to 12, step 1)
list1 = Sequence((cos(2 * i * 3.141592653589793 / n), sin(2 * i * 3.141592653589793 / n)), i, 0, n - 1)
list3 = Sequence((1.1 * cos(2 * i * 3.141592653589793 / n), 1.1 * sin(2 * i * 3.141592653589793 / n)), i, 0, n - 1)
多邊形1 = Polygon(Element[list1, 1], Element[list1, 2], n)
list4 = Sequence(Segment[(0, 0), (cos(2 * i * 3.141592653589793 / n), sin(2 * i * 3.141592653589793 / n))], i, 0, n - 1)
k = 5 (slider from 1 to 24, step 1)
a = Mod(k, n)
P = If(a ≠ 0, Element[list1, a], Element[list1, n])
Q = If(a ≠ 0, Element[list1, a + 1], Element[list1, 1])
α = Angle(P, (0, 0), Q)
b = Segment((0, 0), (cos(2 * k * 3.141592653589793 / n), sin(2 * k * 3.141592653589793 / n)))
A_1: (x(Corner[1]), 0)
A_2: (x(Corner[3]), 0)
u = Vector(A_1, A_2)
A_3: (0, y(Corner[1]))
A_4: (0, y(Corner[3]))
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) + "}", Element[list3, i]], i, 1, n)
文字2 = Text("ω_{" + k + "}", (0.9 * cos(2 * k * 3.141592653589793 / n), 0.9 * sin(2 * k * 3.141592653589793 / n)))
d: k ≤ n
ex: "$ x^{" + (LaTeX[n]) + "}=1 $"
Q_2: 0.35 * Corner[2] + 0.65 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1, e, q_2, q_3, f = Polygon(Corner[1], Q_2, Q_3, Corner[4])
text3: "$ x_k=\left(cos2kπ+isin2kπ   \right)^\frac{1}{" + (LaTeX[n]) + "}  $"
text4: "$ =cos\frac{2kπ}{" + (LaTeX[n]) + "}+isin\frac{2kπ}{" + (LaTeX[n]) + "} $"
text41: "$ k=0,1,...," + (LaTeX[n]) + " $"
Step = 0 (slider from 0 to 4, step 1)