直線的截距式
Author: 藍邦偉  老師

截距式:\frac{x}{a}+\frac{y}{b}=1

a

b

a=

b=

b = 3 (slider from -4 to 4, step 1)
a = 2 (slider from -7 to 7, step 1)
B: (0, b)
A: (a, 0)
a_1 = 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: "直線方程式為:" + (If[x(A) ≟ x(B), "x=0", If[y(A) ≟ y(B), "y=0", "L: \frac{ x }{" + (x(A)) + "}+ \frac{ y }{" + (y(B)) + " }=1"]])
inputBox1 = Textfield(a)
inputBox2 = Textfield(b)