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

$ O $

$Q$

$P$

$Step=%v$

$ 圓方程式(2) $

$ Sol： $

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.7 * Corner[1] + 0.3 * 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])
A_0 = (1.2737557848707342, 1.6078011075356735)
Q = DynamicCoordinates(A_0, floor(x(A_0)), floor(y(A_0)))
B_0 = (3.699212525427398, 3.823179729219312)
P = DynamicCoordinates(B_0, floor(x(B_0)), floor(y(B_0)))
r = Segment(Q, P)
α = 0 rad (slider from 0*° to 6.283185307179586, step 0.1*°)
P' = Rotate(P, α, Q)
c = CircleArc(Q, P, P')
h: x(Q)
k: y(Q)
s = 0 (slider from 0 to 4, step 1)
text1: "$∵ r²=\overline{PQ}^2 =" + (LaTeX[r^(2)]) + "$"
text2: "$ " + (LaTeX[If[h ≠ 0, "(x", "x"]]) + " " + (LaTeX[If[h ≟ 0, "", If[h > 0, "-" * h, If[h < 0, "+" * (-h)]]]]) + "" + (LaTeX[If[h ≟ 0, "", ")"]]) + "^2+" + (LaTeX[If[k ≠ 0, "(y", "y"]]) + "" + (LaTeX[If[k ≟ 0, "", If[k > 0, "-" * k, If[k < 0, "+" * (-k)]]]]) + "" + (LaTeX[If[k ≟ 0, "", ")"]]) + "^2=" + (LaTeX[SurdText[r^(2)]]) + "$"
C_1 = Circle(Q, r)
D_1 = Circle(Q, r)
t_Q: "$ 試求以\;Q\;" + (LaTeX[Q]) + "為圓心且通過\;$
$P\;點" + (LaTeX[P]) + "的圓方程式 $"
d: -2 * h
e: -2 * k
f: h^(2) + k^(2) - r^(2)
text3: "$ 或\;x²+y²" + (LaTeX[If[d > 0, "+" + d + "x", If[d < 0, "-" + (abs(d)) + "x", ""]]]) + "" + (LaTeX[If[e > 0, "+" + e + "y", If[e < 0, "-" + (abs(e)) + "y", ""]]]) + " " + (LaTeX[If[f > 0, "+" + f, If[f < 0, "-" + (-f), ""]]]) + "=0$"