斜截式
Author: 藍邦偉  老師

斜截式

A = (-2, -2)
B = (0.98, 4.04)
a = Line(A, B)
文字2: "通過" + A + "," + B + "兩點的"
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
文字1: "直線方程式為:" + (LaTeX[If[x(A) ≟ x(B), "x=" + (x(A)), If[y(A) ≟ y(B), "y=" + (y(A)), "y=" + (FractionText[Slope[a]]) + "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)))])]]]) + ""