伸縮示例
Author: 藍邦偉  老師

$ 伸縮示例 $

1

2

1

1

$ 參考三角形 $

$ O $

b = -3 (slider from -5 to 5, step 1)
Q_2: 0.67 * Corner[1] + 0.33 * Corner[2]
List1 = Sequence(Sequence[(i, j), i, floor(x(Q_2)) + 1, floor(x(Corner[2]))], j, floor(y(Corner[1])), floor(y(Corner[4])))
a = -1 (slider from -5 to 5, step 1)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
O = (0, 0)
Q_3: (x(Q_2), y(Corner[4]))
poly1, q_1, q_2, q_4, q_3 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
A = Point(List1)
r = 1 (slider from -5 to 5, step 0.1)
A': (r * x(A), r * y(A))
t_A: "$ A" + (LaTeX[A]) + " $"
t_{A'}: "$ A'" + (LaTeX[A']) + " $"
t_{matrix1}: "$ \left [ \begin{array}{cc} x' \\ y' \\ \end{array}  \right ] =\left [\begin{array}{cc} " + (LaTeX[r]) + " & 0 \\ 0 & " + (LaTeX[r]) + " \\ \end{array}   \right ] \left [\begin{array}{cc} x \\ y \\ \end{array}   \right ]  $
             $=\left [ \begin{array}{cc} " + (LaTeX[r]) + " & 0 \\ 0 & " + (LaTeX[r]) + " \\ \end{array}  \right ] \left [\begin{array}{cc} " + (LaTeX[x(A)]) + "  \\ " + (LaTeX[y(A)]) + " \\ \end{array}   \right ] $
             $=\left [\begin{array}{cc} " + (LaTeX[r * x(A)]) + "  \\ " + (LaTeX[r * y(A)]) + "  \\ \end{array}   \right ] $"
h = 1 (slider from -5 to 5, step 0.1)
k = 1 (slider from -5 to 5, step 0.1)
TF1 = true
TF2 = false
A'': (h * x(A), y(A))
text5: "$ A'" + (LaTeX[A'']) + " $"
C_{Ref} = (-18.82476092579167, 3.3280094688871125)
text6: "$ A'" + (LaTeX[A'']) + " $"
c = Segment(O, A)
d = Segment(O, A')
T_{choose2}: "$ x座標伸縮" + (LaTeX[h]) + "倍$"
T_{choose3}: " $y座標伸縮" + (LaTeX[k]) + "倍 $ "
TF3 = false
t_{matrix2}: "$ \left [ \begin{array}{cc} x'  \\ y' \\ \end{array}  \right ]=\left [ \begin{array}{cc} " + (LaTeX[h]) + " & 0 \\ 0 &1 \\ \end{array}  \right ]\left [  \begin{array}{cc} x \\  y \\ \end{array} \right ]    $
          $=\left [ \begin{array}{cc} " + (LaTeX[h]) + " & 0 \\ 0&1 \\ \end{array}  \right ] \left [  \begin{array}{cc} " + (LaTeX[x(A)]) + " \\ " + (LaTeX[y(A)]) + " \\ \end{array} \right ] $
          $=\left [ \begin{array}{cc} " + (LaTeX[h * x(A)]) + " \\ " + (LaTeX[y(A)]) + " \\ \end{array}  \right ] $"
e: y = y(A)
f: x = x(A)
t_{matrix3}: "$ \left [ \begin{array}{cc} x'  \\ y' \\ \end{array}  \right ] =\left [ \begin{array}{cc} 1 & 0 \\ 0&" + (LaTeX[k]) + "  \\ \end{array}  \right ]\left [ \begin{array}{cc} x \\ y \\ \end{array}  \right ] $
               $=\left [ \begin{array}{cc} 1 & 0 \\ 0&" + (LaTeX[k]) + "  \\ \end{array}  \right ] \left [\begin{array}{cc}  " + (LaTeX[x(A)]) + " \\  " + (LaTeX[y(A)]) + " \\ \end{array}   \right ]  $
               $=\left [\begin{array}{cc} " + (LaTeX[x(A)]) + "  \\  " + (LaTeX[k * y(A)]) + " \\ \end{array}   \right ]  $"
A''': (x(A), k * y(A))
t_{A''}: "$ A'(" + (LaTeX[x(A)]) + "," + (LaTeX[k * y(A)]) + ") $"
B = Point(List1)
C = Point(List1)
B': (r * x(B), r * y(B))
C': (r * x(C), r * y(C))
g = Segment(O, B)
i = Segment(O, B')
j = Segment(A, B)
l = Segment(A', B')
m = false
t_B: "$ B" + (LaTeX[B]) + " $"
t_{B'}: "$ B'" + (LaTeX[B']) + " $"
T_{choose1}: "$ 等比例伸縮" + (LaTeX[r]) + " 倍$"