2D 座標架
Author: 藍邦偉  老師

$ O $

$Step=%v$

$B$

$A$

$ 分點公式(2) $

$n=%v$

$m=%v$

$P$

u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
O = (0, 0)
Q_2: 0.67 * Corner[1] + 0.33 * Corner[2]
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])
s = 0 (slider from 0 to 4, step 1)
t1 = 0 (slider from 0 to 1, step 0.01)
t2 = 0 (slider from 0 to 1, step 0.01)
t3 = 0 (slider from 0 to 1, step 0.01)
t4 = 0 (slider from 0 to 1, step 0.01)
t5 = 0 (slider from 0 to 1, step 0.01)
B_0 = (-5.712364359329235, 1.3197852317670598)
B = DynamicCoordinates(B_0, floor(x(B_0)), floor(y(B_0)))
A_0 = (1, 4)
A = DynamicCoordinates(A_0, floor(x(A_0)), floor(y(A_0)))
a1: x(A)
a2: y(A)
b1: x(B)
b2: y(B)
n = 3 (slider from 1 to 10, step 1)
m = 2 (slider from 1 to 10, step 1)
g = GCD(m, n)
P: n / (n - m) * A - m / (n - m) * B
c: n / (n + m)
d: m / (m + n)
u_1 = Vector(O, A)
u_3 = Vector(O, B)
u_2 = Vector(O, P)
A_1: O + t1 * Vector[O, A]
B_1: O + t1 * Vector[O, B]
P_1: O + t1 * Vector[O, P]
v_1 = Vector(O, A_1)
v_2 = Vector(O, P_1)
v_3 = Vector(O, B_1)
a = Segment(P, If[m > n, A, If[m < n, B]])
text10: "$" + (LaTeX[If[m > n, "\;\overrightarrow{OB}", If[m < n, "\;\overrightarrow{OA}"]]]) + "=" + (LaTeX[If[s ≟ 0 ∧ (m > n), "\frac{n}{m}\;\overrightarrow{OA}", If[s ≟ 0 ∧ (m < n), "\frac{m}{n}\;\overrightarrow{OB}", If[(s ≥ 1) ∧ (m > n), "\frac{" + n + "}{" + m + "}\overrightarrow{OA}", If[(s ≥ 1) ∧ (m < n), "\frac{" + m + "}{" + (n * "}\;\overrightarrow{OB}")]]]]]) + "+" + (LaTeX[If[(m > n) ∧ s ≟ 0, "\frac{m-n}{m}", If[(m < n) ∧ s ≟ 0, "\frac{n-m}{n}", If[(m > n) ∧ (s ≥ 1), "\frac{" + (m - n) + "}{" + (m * "}"), If[(s ≥ 1) ∧ (m < n), "\frac{" + (n - m) + "}{" + n + "}"]]]]]) + "\;\overrightarrow{OP}"
text2: "$⇒ " + (LaTeX[If[m > n, "\frac{" + (m - n) + "}{" + m + "}", If[m < n, "\frac{" + (n - m) + "}{" + n + "}"]]]) + "\overrightarrow{OP}=" + (LaTeX[If[m > n, B, If[m < n, A]]]) + "-" + (LaTeX[If[m > n, "\frac{" + n + "}{" + m + "}" + A, If[m < n, "\frac{" + m + "}{" + (n * "}" + B)]]]) + "$"
text4: "$⇒ \overrightarrow{OP}=(\;" + (LaTeX[FractionText[x(P)]]) + "," + (LaTeX[FractionText[y(P)]]) + "\;)$"
text3: "⇒\overrightarrow{OP}=" + (LaTeX[If[m > n, "\frac{" + m + "}{" + (m - n) + "}" + B, If[m < n, "\frac{" + n + "}{" + (n - m) + ("}" * A)]]]) + "-" + (LaTeX[If[m > n, "\frac{" + n + "}{" + (m - n) + "}" + A, If[m < n, "\frac{" + m + "}{" + (n - m) + "}" + B]]]) + ""
text1: "$⇒" + (LaTeX[If[m > n, B, If[m < n, A]]]) + "=" + (LaTeX[If[m > n, "\frac{" + n + "}{" + m + "}" + A, If[m < n, "\frac{" + m + "}{" + (n * "}" + B)]]]) + " +" + (LaTeX[If[m > n, "\frac{" + (m - n) + "}{" + m + "}", If[m < n, "\frac{" + (n - m) + "}{" + n + "}"]]]) + "\overrightarrow{OP}$"
b = Segment(P, If[m < n, B, If[m > n, A]])
list1 = Sequence(A + j / (m - n) * Vector[A, B], j, 1, m)
list2 = Sequence(B + j / (n - m) * Vector[B, A], j, 1, n)
text0: "$ 已知A" + (LaTeX[If[s ≟ 0, "(x_1,y_1)", "" + A]]) + "," + (LaTeX[If[s ≟ 0, "B(x_2,y_2) ", "" + B]]) + "，\;且P\;在$
$\overleftrightarrow{AB}但不在\overline{AB}上，\;若\overline{PA}:\overline{PB}=$
$" + (LaTeX[If[s ≟ 0, "m", "" + (m / g)]]) + ":" + (LaTeX[If[s ≟ 0, "n", "" + (n / g)]]) + ",\;則:$"