旋轉的概念
Author: 藍邦偉  老師

旋轉變換

t = 0 (slider from -1 to 1, step 0.01)
a = 10 (slider from 0.1 to 15, step 0.1)
A = (-7.453221608316043, -4.764146606743964)
B: A + (a, 0)
r: sqrt(2) / 2 * Segment[A, B]
C: A + (a, a)
O: 0.5 * (A + C)
O_1: O - (-15, 0)
a_1: 0.3 * Segment[O, A]
D: A + (0, a)
b = Segment(A, B)
c = Segment(B, C)
d = Segment(C, D)
e = Segment(D, A)
A': O_1 + (r * cos(2 * π * t + 225°), r * sin(2 * π * t + 225°))
B': O_1 + (r * cos(2 * π * t - 45°), r * sin(2 * π * t - 45°))
C': O_1 + (r * cos(2 * π * t + 45°), r * sin(2 * π * t + 45°))
D': O_1 + (r * cos(2 * π * t + 135°), r * sin(2 * π * t + 135°))
f = Segment(D', A')
g = Segment(A', B')
u = Vector((x(O), y(A)), (x(A), y(A)))
v = Vector((x(A), y(A)), (x(A), y(O)))
A_1: O + (a_1, 0)
C_a = Circle(O, 0.3 * Segment[O, A])
A_2: O + (a_1 * cos(30°), a_1 * sin(30°))
i = Segment(D', C')
j = Segment(C', B')
A_3: O + (a_1 * cos(60°), a_1 * sin(60°))
A_4: O + (a_1 * cos(90°), a_1 * sin(90°))
A_5: O + (a_1 * cos(120°), a_1 * sin(120°))
A_6: O + (a_1 * cos(150°), a_1 * sin(150°))
A_7: O + (a_1 * cos(180°), a_1 * sin(180°))
A_8: O + (a_1 * cos(210°), a_1 * sin(210°))
A_9: O + (a_1 * cos(240°), a_1 * sin(240°))
A_{10}: O + (a_1 * cos(270°), a_1 * sin(270°))
A_{11}: O + (a_1 * cos(300°), a_1 * sin(300°))
A_{12}: O + (a_1 * cos(330°), a_1 * sin(330°))
a_2: 0.3 * Segment[O_1, A']
B_2: O_1 + (a_1 * cos(2 * π * t + 30°), a_1 * sin(2 * π * t + 30°))
B_1: O_1 + (a_1 * cos(2 * π * t + 0°), a_1 * sin(2 * π * t + 0°))
B_3: O_1 + (a_1 * cos(2 * π * t + 60°), a_1 * sin(2 * π * t + 60°))
B_4: O_1 + (a_1 * cos(2 * π * t + 90°), a_1 * sin(2 * π * t + 90°))
B_5: O_1 + (a_1 * cos(2 * π * t + 120°), a_1 * sin(2 * π * t + 120°))
B_6: O_1 + (a_1 * cos(2 * π * t + 150°), a_1 * sin(2 * π * t + 150°))
B_7: O_1 + (a_1 * cos(2 * π * t + 180°), a_1 * sin(2 * π * t + 180°))
B_8: O_1 + (a_1 * cos(2 * π * t + 210°), a_1 * sin(2 * π * t + 210°))
B_9: O_1 + (a_1 * cos(2 * π * t + 240°), a_1 * sin(2 * π * t + 240°))
B_{10}: O_1 + (a_1 * cos(2 * π * t + 270°), a_1 * sin(2 * π * t + 270°))
B_{11}: O_1 + (a_1 * cos(2 * π * t + 300°), a_1 * sin(2 * π * t + 300°))
B_{12}: O_1 + (a_1 * cos(2 * π * t + 330°), a_1 * sin(2 * π * t + 330°))
p = Line(A_4, O)
b_1 = Line(A_5, O)
c_{10} = Line(A_6, O)
e_{10} = Line(A_7, O)
f_{10} = Line(A_8, O)
g_1 = Line(A_9, O)
D_4 = Intersect(p, d)
D_5 = Intersect(b_1, d)
D_6 = Intersect(c_{10}, e)
D_7 = Intersect(e, e_{10})
D_8 = Intersect(f_{10}, e)
D_9 = Intersect(g_1, b)
D_{11} = Intersect(b_1, b)
D_{12} = Intersect(c_{10}, c)
D_2 = Intersect(f_{10}, c)
D_3 = Intersect(g_1, d)
D_{10} = Intersect(p, b)
h_1 = Line(B_4, B_{10})
i_1 = Line(B_9, B_3)
j_1 = Line(B_8, B_2)
k_1 = Line(B_7, B_1)
l_1 = Line(B_6, B_{12})
m_1 = Line(B_5, B_{11})
E_4 = Intersect(h_1, i)
E_5 = Intersect(m_1, i)
E_6 = Intersect(f, l_1)
E_7 = Intersect(k_1, f)
E_8 = Intersect(j_1, f)
E_9 = Intersect(i_1, g)
E_{10} = Intersect(h_1, g)
E_{11} = Intersect(g, m_1)
E_{12} = Intersect(l_1, j)
E_1 = Intersect(k_1, j)
E_2 = Intersect(j_1, j)
E_3 = Intersect(i_1, i)
b_2 = Line(O, D_7)
D_1 = Intersect(b_2, c)
c_1 = Segment(D_4, A_4)
c_2 = Segment(E_4, B_4)
c_4 = Segment(D_3, A_3)
c_5 = Segment(E_3, B_3)
c_7 = Segment(A_2, D_2)
c_8 = Segment(B_2, E_2)
d_1 = Segment(A_1, D_1)
d_2 = Segment(B_1, E_1)
d_4 = Segment(D_{12}, A_{12})
d_5 = Segment(B_{12}, E_{12})
e_1 = Segment(A_{10}, D_{10})
d_7 = Segment(D_{11}, A_{11})
d_8 = Segment(B_{11}, E_{11})
e_2 = Segment(B_{10}, E_{10})
e_5 = Segment(B_9, E_9)
e_8 = Segment(B_8, E_8)
f_2 = Segment(B_7, E_7)
f_5 = Segment(B_6, E_6)
f_8 = Segment(B_5, E_5)
e_4 = Segment(A_9, D_9)
e_7 = Segment(A_8, D_8)
f_1 = Segment(A_7, D_7)
f_4 = Segment(A_6, D_6)
f_7 = Segment(A_5, D_5)
C_b = Circle(O_1, 0.3 * Segment[O, A])
o = false
l = false
text2: "旋轉角度" + (t * 360) + "°"