圆心为((x1+x2)/2,(y1+y2)/2)
半径的平方=[(y2-y1)/2]²+[(x2-x1)/2]²
∴圆的方程为:
[x-(x1+x2)/2]²+[y-(y1+y2)/2]²=[(y2-y1)/2]²+[(x2-x1)/2]²
把等式右边的两项全部移到左边,用平方差公式化简。为清晰,分成两个式子书写:
[x-(x1+x2)/2]²-[(x2-x1)/2]²
={[x-(x1+x2)/2]+[(x2-x1)/2]}{[x-(x1+x2)/2]-[(x2-x1)/2]}
=(x-x1)(x-x2)
[y-(y1+y2)/2]²-[(y2-y1)/2]²
={[y-(y1+y2)/2]+[(y2-y1)/2]}{[y-(y1+y2)/2]-[(y2-y1)/2]}
=(y-y1)(y-y2)
所以圆的方程为
(x-x1)(x-x2)+(y-y1)(y-y2)=0