無理數的作圖(5)
Author: 藍邦偉老師

$ 無理數的作圖(5) $

Reset

Start

t = 0 (slider from 0 to 30, step 0.01)
list1 = Sequence(-atan(1 / sqrt(k)), k, 1, 16)
list2 = Append(0, list1)
n: floor(t / 2) + 1
list3 = Sequence(Sum[list2, p], p, 1, 16)
A: (1; Element[list3, n])
A_1: (sqrt(2); -Element[list3, 2] + Element[list3, n])
A_2: (sqrt(3); -Element[list3, 3] + Element[list3, n])
A_3: (2; -Element[list3, 4] + Element[list3, n])
A_4: (sqrt(5); -Element[list3, 5] + Element[list3, n])
A_5: (sqrt(6); -Element[list3, 6] + Element[list3, n])
A_6: (sqrt(7); -Element[list3, 7] + Element[list3, n])
A_7: (sqrt(8); -Element[list3, 8] + Element[list3, n])
A_8: (sqrt(9); -Element[list3, 9] + Element[list3, n])
A_9: (sqrt(10); -Element[list3, 10] + Element[list3, n])
A_{10}: (sqrt(11); -Element[list3, 11] + Element[list3, n])
A_{11}: (sqrt(12); -Element[list3, 12] + Element[list3, n])
A_{12}: (sqrt(13); -Element[list3, 13] + Element[list3, n])
A_{13}: (sqrt(14); -Element[list3, 14] + Element[list3, n])
A_{14}: (sqrt(15); -Element[list3, 15] + Element[list3, n])
A_{15}: (sqrt(16); -Element[list3, 16] + Element[list3, n])
O = (0, 0)
m = 1 (slider from -5 to 5, step 1)
f(x, m) = (abs(x - m) - abs(x - m - 1) + 1) / 2
A1 = 0
A2 = 1
A3: 2 * A2 - A1
A4: 2 * A3 - A2
A5: 2 * A4 - A3
A6: 2 * A5 - A4
A7: 2 * A6 - A5
A8: 2 * A7 - A6
A9: 2 * A8 - A7
A10: 2 * A9 - A8
A11: 2 * A10 - A9
A12: 2 * A11 - A10
A13: 2 * A12 - A11
A14: 2 * A13 - A12
A15: 2 * A14 - A13
A16: 2 * A15 - A14
A17: 2 * A16 - A15
A18: 2 * A17 - A16
A19: 2 * A18 - A17
A20: 2 * A19 - A18
A21: 2 * A20 - A19
A22: 2 * A21 - A20
A23: 2 * A22 - A21
A24: 2 * A23 - A22
A25: 2 * A24 - A23
A26: 2 * A25 - A24
A27: 2 * A26 - A25
A28: 2 * A27 - A26
A29: 2 * A28 - A27
A30: 2 * A29 - A28
A31: 2 * A30 - A29
A32: 2 * A31 - A30
B1: f(t, A1)
B2: f(t, A2)
B3: f(t, A3)
B4: f(t, A4)
B5: f(t, A5)
B6: f(t, A6)
B7: f(t, A7)
B8: f(t, A8)
B9: f(t, A9)
B10: f(t, A10)
B11: f(t, A11)
B12: f(t, A12)
B13: f(t, A13)
B14: f(t, A14)
B15: f(t, A15)
B16: f(t, A16)
B17: f(t, A17)
B18: f(t, A18)
B19: f(t, A19)
B20: f(t, A20)
B21: f(t, A21)
B22: f(t, A22)
B23: f(t, A23)
B24: f(t, A24)
B25: f(t, A25)
B26: f(t, A26)
B27: f(t, A27)
B28: f(t, A28)
B29: f(t, A29)
B30: f(t, A30)
B31: f(t, A31)
B32: f(t, A32)
A33: 2 * A32 - A31
B33: f(t, A33)
P_0: A + B1 * Vector[A, O]
a_0 = Segment(A, P_0)
P_1: A + B1 * Vector[A, A_1]
a_1 = Segment(A, P_1)
P_2: O + B2 * Vector[O, A_1]
a_2 = Segment(O, P_2)
P_3 = Rotate(A, -B3 * Angle[A_2, A_1, A], A_1)
a_3 = Segment(A_1, P_3)
P_4: O + B4 * Vector[O, A_2]
a_4 = Segment(O, P_4)
P_5 = Rotate(A_1, -B5 * Angle[A_3, A_2, A_1], A_2)
a_5 = Segment(A_2, P_5)
P_6: O + B6 * Vector[O, A_3]
P_8: O + B8 * Vector[O, A_4]
P_{10}: O + B10 * Vector[O, A_5]
P_{12}: O + B12 * Vector[O, A_6]
P_{14}: O + B14 * Vector[O, A_7]
P_{16}: O + B16 * Vector[O, A_8]
P_{18}: O + B18 * Vector[O, A_9]
P_{20}: O + B20 * Vector[O, A_{10}]
P_{22}: O + B22 * Vector[O, A_{11}]
P_{24}: O + B24 * Vector[O, A_{12}]
P_{26}: O + B26 * Vector[O, A_{13}]
P_{28}: O + B28 * Vector[O, A_{14}]
P_{30}: O + B30 * Vector[O, A_{15}]
a_6 = Segment(O, P_6)
P_7 = Rotate(A_2, -B7 * Angle[A_4, A_3, A_2], A_3)
P_9 = Rotate(A_3, -B9 * Angle[A_5, A_4, A_3], A_4)
a_7 = Segment(P_7, A_3)
a_8 = Segment(P_8, O)
a_9 = Segment(P_9, A_4)
a_a = Segment(P_{10}, O)
P_{11} = Rotate(A_4, -B11 * Angle[A_6, A_5, A_4], A_5)
a_b = Segment(P_{11}, A_5)
a_c = Segment(P_{12}, O)
P_{13} = Rotate(A_5, -B13 * Angle[A_7, A_6, A_5], A_6)
a_d = Segment(P_{13}, A_6)
a_e = Segment(P_{14}, O)
P_{15} = Rotate(A_6, -B15 * Angle[A_8, A_7, A_6], A_7)
a_f = Segment(P_{15}, A_7)
a_g = Segment(P_{16}, O)
P_{17} = Rotate(A_7, -B17 * Angle[A_9, A_8, A_7], A_8)
a_h = Segment(P_{17}, A_8)
a_i = Segment(P_{18}, O)
P_{19} = Rotate(A_8, -B19 * Angle[A_{10}, A_9, A_8], A_9)
a_j = Segment(P_{19}, A_9)
a_k = Segment(P_{20}, O)
P_{21} = Rotate(A_9, -B21 * Angle[A_{11}, A_{10}, A_9], A_{10})
a_l = Segment(P_{21}, A_{10})
a_m = Segment(P_{22}, O)
P_{23} = Rotate(A_{10}, -B23 * Angle[A_{12}, A_{11}, A_{10}], A_{11})
a_n = Segment(P_{23}, A_{11})
a_o = Segment(P_{24}, O)
P_{25} = Rotate(A_{11}, -B25 * Angle[A_{13}, A_{12}, A_{11}], A_{12})
a_p = Segment(P_{25}, A_{12})
a_q = Segment(P_{26}, O)
P_{27} = Rotate(A_{12}, -B27 * Angle[A_{14}, A_{13}, A_{12}], A_{13})
a_r = Segment(P_{27}, A_{13})
a_s = Segment(P_{28}, O)
P_{29} = Rotate(A_{13}, -B29 * Angle[A_{15}, A_{14}, A_{13}], A_{14})
a_t = Segment(P_{29}, A_{14})
a_u = Segment(P_{30}, O)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
list5 = Sequence(Text[k, (k + 0.05, -0.2)], k, floor(x(Corner[1])), floor(x(Corner[3])))
list4 = Sequence((k, 0), k, floor(x(Corner[1])), floor(x(Corner[3])) - 1)
text1: "$ \sqrt{" + (LaTeX[n]) + "} " + (LaTeX[If[n ≟ 1, "=1", If[n ≟ 4, "=2", If[n ≟ 9, "=3", If[n ≟ 16, "=4"]]]]]) + "$"