三個點坐標
(a1, b1, a2, b2, a3, b3)
圓心坐標 ( p, q)
根據(jù)圓上三點坐標計算圓心坐標
u = (a1 ^ 2 - a2 ^ 2 + b1 ^ 2 - b2 ^ 2) / (2 * (a1 - a2))
v = (a1 ^ 2 - a3 ^ 2 + b1 ^ 2 - b3 ^ 2) / (2 * (a1 - a3))
k1 = (b1 - b2) / (a1 - a2)
k2 = (b1 - b3) / (a1 - a3)
q = (u - v) / (k1 - k2)
p = v - (u - v) * k2 / (k1 - k2)
Good Luck~