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

$ O $

$A$

$B$

$Step=%v$

$ 圓的直徑式 $

$ 已知A,B\;兩點，\;求以\overline{AB}為直$
$徑之圓方程式 $

$ Sol： $

Reset

$P(x,y)$

$ 在圓C上任取一點P(x,y) $

$ ∵∠APB=90° ∴\overrightarrow{AP}\cdot\overrightarrow{BP}=0$

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.65 * Corner[1] + 0.35 * 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.5145664721556558, 0.5956022545250422)
B_0 = (3.3172506941026323, 1.5505068328369565)
A = DynamicCoordinates(A_0, floor(x(A_0)), ceil(y(A_0)))
B = DynamicCoordinates(B_0, floor(x(B_0)), ceil(y(B_0)))
h: x(A)
k: y(A)
p: x(B)
q: y(B)
Q = Midpoint(A, B)
α = 0 rad (slider from 0 to 180*°, step 0.1*°)
A' = Rotate(A, α, Q)
B' = Rotate(B, α, Q)
c = CircleArc(Q, B, B')
d = CircleArc(Q, A, A')
s = 0 (slider from 0 to 6, step 1)
text1: "$已知 A" + (LaTeX[A]) + "，\;B" + (LaTeX[B]) + " 兩點$"
r = Distance(Q, A)
C = Circle(Q, r)
P = Point(C)
a = Segment(A, B)
b = 0 (slider from 0 to 1, step 0.01)
A_2: A + b * Vector[A, P]
B_2: B + b * Vector[B, P]
w = Vector(A, A_2)
z = Vector(B, B_2)
β = Angle(B, P, A)
e: s ≟ 4
f = Segment(A, P)
g = Segment(B, P)
text3: "$ 取向量\overrightarrow{AP}=(x" + (LaTeX[If[h ≟ 0, "", If[h < 0, "+" * (-h), "-" * h]]]) + ",y" + (LaTeX[If[k ≟ 0, "", If[k < 0, "+" * (-k), "-" * k]]]) + ")$
$與\overrightarrow{BP}=(x" + (LaTeX[If[p ≟ 0, "", If[p < 0, "+" * (-p), "-" * p]]]) + ",y" + (LaTeX[If[q ≟ 0, "", If[q < 0, "+" * (-q), "-" * q]]]) + ")$ "
text5: "$ " + (LaTeX[If[h ≟ 0, "x", "(x"]]) + " " + (LaTeX[If[h ≟ 0, "", If[h < 0, "+" * (-h), "-" * h]]]) + "" + (LaTeX[If[h ≟ 0, "", ")"]]) + "" + (LaTeX[If[p ≟ 0, "x", "(x"]]) + "" + (LaTeX[If[p ≟ 0, "", If[p < 0, "+" * (-p), "-" * p]]]) + "" + (LaTeX[If[p ≟ 0, "", ")"]]) + "+" + (LaTeX[If[k ≟ 0, "y", "(y"]]) + "" + (LaTeX[If[k ≟ 0, "", If[k < 0, "+" * (-k), "-" * k]]]) + "" + (LaTeX[If[k ≟ 0, "", ")"]]) + "" + (LaTeX[If[q ≟ 0, "y", "(y"]]) + "" + (LaTeX[If[q ≟ 0, "", If[q < 0, "+" * (-q), "-" * q]]]) + "" + (LaTeX[If[q ≟ 0, "", ")"]]) + "=0$"
text6: "$ " + (LaTeX[C]) + " $"
poly2, b_1, a_1, p_1 = Polygon(A, P, B)