斜截式
Author: 藍邦偉  老師
Date: 15 1 月 2013

$A%v$

$B%v$

$ 斜截式 $
$通過A(0,k)且斜率為\;m\;的直$
$線方程式為\;L:y=mx+k$

$m=%fractiontext[v]$

A_0 = (-0.002087804878050143, 2.7126048780487837)
B_0 = (3, 6)
A = DynamicCoordinates(A_0, 0, floor(y(A_0)))
B = DynamicCoordinates(B_0, floor(x(B_0)), floor(y(B_0)))
L = Line(A, B)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
Q_2: 0.3 * Corner[2] + 0.7 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1, b, q_2, q_3, c = Polygon(Corner[1], Q_2, Q_3, Corner[4])
m = Slope(L)
text2: "$ 已知直線\;L\;的斜率為\;" + (LaTeX[FractionText[m]]) + "\;，$
$且\;A" + (LaTeX[A]) + " 在其上，\;則直線$
$L:" + (LaTeX[If[x(A) ≟ x(B), "x=" + (x(A)), If[y(A) ≟ y(B), "y=" + (y(A)), "y=" + (FractionText[Slope[L]]) + "x" + (If[(x(A) * y(B) - x(B) * y(A)) / (x(A) - x(B)) ≥ 0, "+", "-"]) + (FractionText[abs((x(A) * y(B) - x(B) * y(A)) / (x(A) - x(B)))])]]]) + "$"
t_m: "$ m=" + (LaTeX[FractionText[m]]) + " $"