圓的一般式
Author: 藍邦偉　老師

圓的一般式

d

e

f

d=

$ e= $

f=

u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
d = 4 (slider from -5 to 5, step 0.1)
e = -2 (slider from -5 to 5, step 0.1)
f = -1 (slider from -5 to 5, step 0.1)
C_1: x^(2) + y^(2) + d * x + e * y + f = 0
T_1 = Corner(1)
T_4 = Corner(4)
T_2: (13 * Corner[1] + 7 * Corner[2]) / 20
T_3: (13 * Corner[4] + 7 * Corner[3]) / 20
多邊形1, t_1, t_2, t_3, t_4 = Polygon(T_1, T_2, T_3, T_4)
Q: ((-d) / 2, (-e) / 2)
a = Segment(T_2, T_3)
inputBox1 = Textfield(d)
inputBox2 = Textfield(e)
inputBox3 = Textfield(f)
text4: "圓心是Q" + Q
text5: " x²+y²" + (If[d < 0, "-", "+"]) + (abs(d)) + "x" + (If[e < 0, "-", "+"]) + (abs(e)) + "y" + (If[f < 0, "-", "+"]) + (abs(f) * "=0")
text6: "半徑r=\frac{1}{2}\sqrt{" + (d^(2)) + "+" + (e^(2)) + (If[f > 0, "-", "+"]) + (abs(4 * f)) + "}"
text7: "=\frac{1}{2}\sqrt{" + (d^(2) + e^(2) - 4 * f) + "}"
text8: "=" + (0.5 * sqrt(d^(2) + e^(2) - 4 * f))