円と直線の交点

円と直線の交点を計算で求めましょう。

(

,

(

,

), 

) である。

正解

n = Random(1, 6)
r = Element({5, 10, 17, 13, 20, 25}, n)
px = Element({1, 1, 1, 2, 2, 3}, n)
py = Element({2, 3, 4, 3, 4, 4}, n)
ax: (px * ((Random[0, 1] * 2) - 1))
ay: (py * ((Random[0, 1] * 2) - 1))
bx: (py * ((Random[0, 1] * 2) - 1))
by: (px * ((Random[0, 1] * 2) - 1))
a: ay - by
b: bx - ax
c: (ax * by) - (bx * ay)
f = Expand((a * x) + (b * y) + c)
text1: "x^2+y^2=" + (LaTeX[r]) + "と\," + (LaTeX[f]) + "=0との交点は"
ax0 = 0
ay0 = 0
bx0 = 0
by0 = 0
入力ボックス1 = Textfield(ax0)
入力ボックス2 = Textfield(ay0)
入力ボックス3 = Textfield(bx0)
入力ボックス4 = Textfield(by0)
ans1: ax ≟ ax0 ∧ ay ≟ ay0 ∧ bx ≟ bx0 ∧ by ≟ by0
ans2: ax ≟ bx0 ∧ ay ≟ by0 ∧ bx ≟ ax0 ∧ by ≟ ay0
ans: ans1 ∨ ans2